X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0016d70b76e2706064b54c9dd24d45a45646b0de..f33ba69e92f389f5884eae5a586858a629a5260b:/sshrsa.c diff --git a/sshrsa.c b/sshrsa.c index e7fca008..f684c2af 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) return -1; + if (n < 0 || bignum_bitcount(result->modulus) == 0) return -1; if (result) result->bytes = n - 2; if (keystr)