aboutsummaryrefslogtreecommitdiffstats
path: root/agent/protect.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-09-28 14:12:10 +0000
committerWerner Koch <[email protected]>2004-09-28 14:12:10 +0000
commit5e9f8cd329cfb131e59ae9d35693a38b6297dcbe (patch)
treeda64fb3e1444fd400edb95bcc50537bd0c27d995 /agent/protect.c
parent2004-09-25 Moritz Schulte <[email protected]> (diff)
downloadgnupg-5e9f8cd329cfb131e59ae9d35693a38b6297dcbe.tar.gz
gnupg-5e9f8cd329cfb131e59ae9d35693a38b6297dcbe.zip
(agent_unprotect): Fixed wiping of CLEARTEXT. Thanks
to Moritz for pointing this out.
Diffstat (limited to 'agent/protect.c')
-rw-r--r--agent/protect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/protect.c b/agent/protect.c
index 2de5e97c5..edcca36d9 100644
--- a/agent/protect.c
+++ b/agent/protect.c
@@ -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;