Skip to content

Commit

Permalink
Add an assertion so that short-rsa2-key-crash at least avoids segfaul…
Browse files Browse the repository at this point in the history
…ting

while we come up with a better solution.


git-svn-id: svn://svn.tartarus.org/sgt/putty@5146 cda61777-01e9-0310-a592-d414129be87e
  • Loading branch information
ben committed Jan 19, 2005
1 parent 10e09fb commit e99cd73
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sshrsa.c
Expand Up @@ -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;
Expand Down

0 comments on commit e99cd73

Please sign in to comment.