mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
parent
1c21031d5e
commit
be3d310c56
@ -3448,7 +3448,7 @@ _cmd_xa(gchar **args, struct cmd_help_t help)
|
||||
|
||||
static char *
|
||||
_ask_password(void) {
|
||||
char *passwd = malloc(sizeof(char) * 21);
|
||||
char *passwd = malloc(sizeof(char) * (MAX_PASSWORD_SIZE + 1));
|
||||
status_bar_get_password();
|
||||
status_bar_refresh();
|
||||
inp_block();
|
||||
|
@ -23,6 +23,8 @@
|
||||
#ifndef ACCOUNTS_H
|
||||
#define ACCOUNTS_H
|
||||
|
||||
#define MAX_PASSWORD_SIZE 64
|
||||
|
||||
#include "common.h"
|
||||
|
||||
typedef struct prof_account_t {
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
#include "command/command.h"
|
||||
#include "common.h"
|
||||
#include "config/accounts.h"
|
||||
#include "config/preferences.h"
|
||||
#include "config/theme.h"
|
||||
#include "log.h"
|
||||
@ -206,7 +207,7 @@ inp_get_password(char *passwd)
|
||||
_clear_input();
|
||||
_inp_win_refresh();
|
||||
noecho();
|
||||
mvwgetnstr(inp_win, 0, 1, passwd, 20);
|
||||
mvwgetnstr(inp_win, 0, 1, passwd, MAX_PASSWORD_SIZE);
|
||||
wmove(inp_win, 0, 0);
|
||||
echo();
|
||||
status_bar_clear();
|
||||
|
Loading…
Reference in New Issue
Block a user