wolfcrypt/src/ecc.c:fix overstringent arg check in wc_ecc_gen_k().

This commit is contained in:
Daniel Pouzzner
2023-04-10 20:25:46 -05:00
parent 7155c5748e
commit fe2acb53af

View File

@ -4974,7 +4974,7 @@ int wc_ecc_gen_k(WC_RNG* rng, int size, mp_int* k, mp_int* order)
int err;
byte buf[ECC_MAXSIZE_GEN];
if (rng == NULL || size <= 0 || size + 8 > ECC_MAXSIZE_GEN || k == NULL ||
if (rng == NULL || size < 0 || size + 8 > ECC_MAXSIZE_GEN || k == NULL ||
order == NULL) {
return BAD_FUNC_ARG;
}