1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-05 23:07:49 +02:00

(agent_unprotect): Fixed wiping of CLEARTEXT. Thanks

to Moritz for pointing this out.
This commit is contained in:
Werner Koch 2004-09-28 14:12:10 +00:00
parent 1db08a412c
commit 5e9f8cd329
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-09-28 Werner Koch <wk@g10code.com>
* protect.c (agent_unprotect): Fixed wiping of CLEARTEXT. Thanks
to Moritz for pointing this out.
2004-09-25 Moritz Schulte <moritz@g10code.com> 2004-09-25 Moritz Schulte <moritz@g10code.com>
* agent.h: Declare: agent_pksign_do. * agent.h: Declare: agent_pksign_do.

View File

@ -699,7 +699,7 @@ agent_unprotect (const unsigned char *protectedkey, const char *passphrase,
/* Albeit cleartext has been allocated in secure memory and thus /* Albeit cleartext has been allocated in secure memory and thus
xfree will wipe it out, we do an extra wipe just in case xfree will wipe it out, we do an extra wipe just in case
somethings goes badly wrong. */ somethings goes badly wrong. */
wipememory (cleartext, prot_begin-protectedkey); wipememory (cleartext, n);
xfree (cleartext); xfree (cleartext);
if (rc) if (rc)
return rc; return rc;