mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 12:56:20 +00:00
@@ -3530,7 +3530,7 @@ _cmd_xa(gchar **args, struct cmd_help_t help)
|
|||||||
|
|
||||||
static char *
|
static char *
|
||||||
_ask_password(void) {
|
_ask_password(void) {
|
||||||
char *passwd = malloc(sizeof(char) * 21);
|
char *passwd = malloc(sizeof(char) * (MAX_PASSWORD_SIZE + 1));
|
||||||
status_bar_get_password();
|
status_bar_get_password();
|
||||||
status_bar_refresh();
|
status_bar_refresh();
|
||||||
inp_block();
|
inp_block();
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
#ifndef ACCOUNTS_H
|
#ifndef ACCOUNTS_H
|
||||||
#define ACCOUNTS_H
|
#define ACCOUNTS_H
|
||||||
|
|
||||||
|
#define MAX_PASSWORD_SIZE 64
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
typedef struct prof_account_t {
|
typedef struct prof_account_t {
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "command/command.h"
|
#include "command/command.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "config/accounts.h"
|
||||||
#include "config/preferences.h"
|
#include "config/preferences.h"
|
||||||
#include "config/theme.h"
|
#include "config/theme.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@@ -207,7 +208,7 @@ inp_get_password(char *passwd)
|
|||||||
_clear_input();
|
_clear_input();
|
||||||
_inp_win_refresh();
|
_inp_win_refresh();
|
||||||
noecho();
|
noecho();
|
||||||
mvwgetnstr(inp_win, 0, 1, passwd, 20);
|
mvwgetnstr(inp_win, 0, 1, passwd, MAX_PASSWORD_SIZE);
|
||||||
wmove(inp_win, 0, 0);
|
wmove(inp_win, 0, 0);
|
||||||
echo();
|
echo();
|
||||||
status_bar_clear();
|
status_bar_clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user