Add check for length == 0 in wc_Arc4SetKey

This commit is contained in:
Carie Pointer
2019-12-17 13:28:50 -07:00
parent a2cdb87067
commit cfd91fb0b8

View File

@@ -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;
}