From cfd91fb0b8813740e775f88a3b37d3c9b0da21bd Mon Sep 17 00:00:00 2001 From: Carie Pointer Date: Tue, 17 Dec 2019 13:28:50 -0700 Subject: [PATCH] Add check for length == 0 in wc_Arc4SetKey --- wolfcrypt/src/arc4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/arc4.c b/wolfcrypt/src/arc4.c index a9c476b33..9fcd71d86 100644 --- a/wolfcrypt/src/arc4.c +++ b/wolfcrypt/src/arc4.c @@ -38,7 +38,7 @@ int wc_Arc4SetKey(Arc4* arc4, const byte* key, word32 length) word32 i; word32 keyIndex = 0, stateIndex = 0; - if (arc4 == NULL || key == NULL || length <= 0) { + if (arc4 == NULL || key == NULL || length == 0) { return BAD_FUNC_ARG; }