X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/000cae2e7173b90cf8869667d8e5253a8ccd1dea..ae0500e538e2fb821ef1ad8529aed7999acf7a19:/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)