Skip to content

Commit 7f302da

Browse files
committed
make sure size is valid
1 parent c702ac6 commit 7f302da

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/pk/rsa/rsa_make_key.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ int rsa_make_key(prng_state *prng, int wprng, int size, long e, rsa_key *key)
3131

3232
LTC_ARGCHK(ltc_mp.name != NULL);
3333
LTC_ARGCHK(key != NULL);
34+
LTC_ARGCHK(size > 0);
3435

3536
if ((e < 3) || ((e & 1) == 0)) {
3637
return CRYPT_INVALID_ARG;

0 commit comments

Comments
 (0)