Commit 708ed766 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dvbinfo: check optarg

parent 9ee8155e
......@@ -609,6 +609,8 @@ int main(int argc, char **pp_argv)
/* - tuning options - */
case 'c':
if (optarg)
{
param->threshold = strtoul(optarg, NULL, 10);
if (((errno == ERANGE) && (param->threshold == ULONG_MAX)) ||
((errno != 0) && (param->threshold == 0)))
......@@ -617,6 +619,7 @@ int main(int argc, char **pp_argv)
params_free(param);
usage();
}
}
break;
/* - Statistics */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment