coverity cid #386958 - tainted value

This commit is contained in:
iceman1001 2022-02-21 21:41:11 +01:00
parent 04b86073b2
commit 06ccaf555c

View file

@ -365,6 +365,13 @@ int main(int argc, char *argv[]) {
}
uint8_t g_idx = atoi(argv[2]);
// -2 (zero index and last item is NULL);
if (g_idx > ARRAYLEN(generators) - 2) {
printf("generator index is out-of-range\n");
return 1;
}
uint64_t start_time = atoi(argv[3]);
const bool support_aesni = platform_aes_hw_available();