X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/10e09fb5580b3016fcc4730c0a1562f484667988..e99cd73fed21152a2cea8d43cd76d33eda408b08:/sshrsa.c diff --git a/sshrsa.c b/sshrsa.c index baec83e0..4f95fb38 100644 --- a/sshrsa.c +++ b/sshrsa.c @@ -802,6 +802,7 @@ static unsigned char *rsa2_sign(void *key, char *data, int datalen, SHA_Simple(data, datalen, hash); nbytes = (bignum_bitcount(rsa->modulus) - 1) / 8; + assert(1 <= nbytes - 20 - ASN1_LEN); bytes = snewn(nbytes, unsigned char); bytes[0] = 1;