Return error if the number of threads specified with --threads is greater than MAX_THREADS

This commit is contained in:
plusvic
2016-09-08 18:41:59 +02:00
parent eeeb703f10
commit e516bedb4b
+6
View File
@@ -1011,6 +1011,12 @@ int main(
return EXIT_SUCCESS;
}
if (threads > MAX_THREADS)
{
fprintf(stderr, "maximum number of threads is %d\n", MAX_THREADS);
return EXIT_FAILURE;
}
if (argc != 2)
{
// After parsing the command-line options we expect two additional