From 28edeffea8401fb1c5936290c1b3ef637e20bcd4 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 7 Sep 2001 22:52:51 +0000 Subject: [PATCH] RDB points out that when you memset a newly allocated structure to zero, covering the size of the _structure_ rather than the size of the pointer to it might help :-) git-svn-id: svn://svn.tartarus.org/sgt/putty@1245 cda61777-01e9-0310-a592-d414129be87e --- pageant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pageant.c b/pageant.c index e0018639..6ab373e1 100644 --- a/pageant.c +++ b/pageant.c @@ -652,7 +652,7 @@ static void answer_msg(void *msg) char *comment; int commentlen; key = smalloc(sizeof(struct RSAKey)); - memset(key, 0, sizeof(key)); + memset(key, 0, sizeof(struct RSAKey)); p += makekey(p, key, NULL, 1); p += makeprivate(p, key); p += ssh1_read_bignum(p, &key->iqmp); /* p^-1 mod q */ -- 2.11.0