X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8fb63331586e5d15431565212688c4b70365f15b..26d98fc6febae09ed37a430bf24dd519593a5a4c:/sshrsa.c diff --git a/sshrsa.c b/sshrsa.c index f684c2af..baec83e0 100644 --- a/sshrsa.c +++ b/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)