mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 09:37:34 -05:00
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 :-) [originally from svn r1245]
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user