mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-09 23:28:06 -05:00
`dwalin' spotted a NULL dereference in the new makekey() error
handling. Oops. [originally from svn r4541]
This commit is contained in:
parent
c7498e2b18
commit
e7470a08cd
2
sshrsa.c
2
sshrsa.c
@ -54,7 +54,7 @@ int makekey(unsigned char *data, int len, struct RSAKey *result,
|
||||
}
|
||||
|
||||
n = ssh1_read_bignum(p, len, result ? &result->modulus : NULL);
|
||||
if (n < 0 || bignum_bitcount(result->modulus) == 0) return -1;
|
||||
if (n < 0 || (result && bignum_bitcount(result->modulus) == 0)) return -1;
|
||||
if (result)
|
||||
result->bytes = n - 2;
|
||||
if (keystr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user