X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sshrsa.c;h=baec83e02d517e046557895d8c7623d76df6ce08;hb=4c31b113a6deb4894b640e4989ae9ef1f8063c0e;hp=e7fca00852f8ce38b12086a4c3b047b861aef3ff;hpb=421726993172ee902470bd4c63c740061aa956f3;p=PuTTY.git diff --git a/sshrsa.c b/sshrsa.c index e7fca008..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) return -1; + if (n < 0 || (result && bignum_bitcount(result->modulus) == 0)) return -1; if (result) result->bytes = n - 2; if (keystr)