(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>
* 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
xfree will wipe it out, we do an extra wipe just in case
somethings goes badly wrong. */
wipememory (cleartext, prot_begin-protectedkey);
wipememory (cleartext, n);
xfree (cleartext);
if (rc)
return rc;