diff --git a/dieharder/run_test.c b/dieharder/run_test.c index b6ec195..810427b 100644 --- a/dieharder/run_test.c +++ b/dieharder/run_test.c @@ -28,7 +28,7 @@ void run_test() } } } - if(dtest_num >= 0){ + if(dtest_num >= 0 && dtest_num < MAXTESTS && dh_test_types[dtest_num]){ execute_test(dtest_num); } else { fprintf(stderr,"Error: dtest_num = %d. No test found.\n",dtest_num);