From 7f302dab540f00759f1304ac52615e7d3d53a1c9 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 2 Oct 2017 01:18:36 +0200 Subject: [PATCH] make sure size is valid --- src/pk/rsa/rsa_make_key.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pk/rsa/rsa_make_key.c b/src/pk/rsa/rsa_make_key.c index 8ba6ab1..c5c4c28 100644 --- a/src/pk/rsa/rsa_make_key.c +++ b/src/pk/rsa/rsa_make_key.c @@ -31,6 +31,7 @@ int rsa_make_key(prng_state *prng, int wprng, int size, long e, rsa_key *key) LTC_ARGCHK(ltc_mp.name != NULL); LTC_ARGCHK(key != NULL); + LTC_ARGCHK(size > 0); if ((e < 3) || ((e & 1) == 0)) { return CRYPT_INVALID_ARG;