1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* ttyio.c (do_get): Assume that anything read from the user without

echoing to the screen is sensitive and put it in secure memory.
Suggested by Benjamin Bennett.
This commit is contained in:
David Shaw 2007-02-01 04:21:07 +00:00
parent ef9e1b5fbc
commit 67c18b8c3c
2 changed files with 8 additions and 1 deletions

View file

@ -405,7 +405,8 @@ do_get( const char *prompt, int hidden )
init_ttyfp();
last_prompt_len = 0;
buf = xmalloc(n=50);
n = 50;
buf = hidden ? xmalloc_secure(n) : xmalloc(n);
i = 0;
#ifdef _WIN32 /* windoze version */