Explorar o código

make sure size is valid

Steffen Jaeckel %!s(int64=8) %!d(string=hai) anos
pai
achega
7f302dab54
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/pk/rsa/rsa_make_key.c

+ 1 - 0
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;