From 5e9f8cd329cfb131e59ae9d35693a38b6297dcbe Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 28 Sep 2004 14:12:10 +0000 Subject: [PATCH] (agent_unprotect): Fixed wiping of CLEARTEXT. Thanks to Moritz for pointing this out. --- agent/ChangeLog | 5 +++++ agent/protect.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/agent/ChangeLog b/agent/ChangeLog index 032308608..22846f3bd 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,8 @@ +2004-09-28 Werner Koch + + * protect.c (agent_unprotect): Fixed wiping of CLEARTEXT. Thanks + to Moritz for pointing this out. + 2004-09-25 Moritz Schulte * agent.h: Declare: agent_pksign_do. 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;