1
0
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:
Simon Tatham 2004-09-12 22:02:06 +00:00
parent c7498e2b18
commit e7470a08cd

View File

@ -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)