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
@ -161,8 +161,10 @@ main(argc, argv)
|
||||
av[1] = "-l";
|
||||
comp = &av[0];
|
||||
}
|
||||
else if (++ap == av + ENTRIES)
|
||||
else if (++ap == av + ENTRIES) {
|
||||
*ap = NULL;
|
||||
break;
|
||||
}
|
||||
lp = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user