1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Added MAX_PASSWORD_SIZE set to 64

fixes #245
This commit is contained in:
James Booth 2013-11-07 22:15:43 +00:00
parent 1c21031d5e
commit be3d310c56
3 changed files with 5 additions and 2 deletions

View File

@ -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();

View File

@ -23,6 +23,8 @@
#ifndef ACCOUNTS_H
#define ACCOUNTS_H
#define MAX_PASSWORD_SIZE 64
#include "common.h"
typedef struct prof_account_t {

View File

@ -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();