mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 21:42:47 -05:00
More sensible error handling when we receive an SSH1 public key
modulus of zero (!!), and also a robustness fix in ssh1_rdpkt which I happened to notice while debugging that. [originally from svn r4516]
This commit is contained in:
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) return -1;
|
||||
if (n < 0 || bignum_bitcount(result->modulus) == 0) return -1;
|
||||
if (result)
|
||||
result->bytes = n - 2;
|
||||
if (keystr)
|
||||
|
Reference in New Issue
Block a user