Terminate the array of execv(3) pointers by a NULL pointer in the edge case.
PR: bin/30913 Submitted by: Dimitri Lommers <dimitri@hinttech.com>
This commit is contained in:
parent
6ea8d9af05
commit
9f619f7956
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84454
@ -161,8 +161,10 @@ main(argc, argv)
|
|||||||
av[1] = "-l";
|
av[1] = "-l";
|
||||||
comp = &av[0];
|
comp = &av[0];
|
||||||
}
|
}
|
||||||
else if (++ap == av + ENTRIES)
|
else if (++ap == av + ENTRIES) {
|
||||||
|
*ap = NULL;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
lp = NULL;
|
lp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user