mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Check the # of arguments, instead of silently dumping core.
This commit is contained in:
parent
279884182f
commit
54e66fcad5
1 changed files with 2 additions and 0 deletions
|
|
@ -64,6 +64,8 @@ main(argc, argv)
|
|||
{
|
||||
int niceness = DEFNICE;
|
||||
|
||||
if (argc < 2)
|
||||
errx(1, "usage: nice [-number] command [arguments]");
|
||||
if (argv[1][0] == '-')
|
||||
if (argv[1][1] == '-' || isdigit(argv[1][1])) {
|
||||
niceness = atoi(argv[1] + 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue