This patch fixes the following Coverity complaint:
CID 280681 (#1 of 1): Untrusted value as argument (TAINTED_SCALAR)
4. tainted_data: Passing tainted variable threads to a tainted sink.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
mib = strtoul(argv[1], NULL, 10);
threads = strtoul(argv[2], NULL, 10);
+ if (threads < 1 || threads > 65536) {
+ printf("%s: invalid 'threads' argument\n", argv[0]);
+ return 1;
+ }
pthreads = calloc(threads, sizeof(pthread_t));
td.mib = mib;