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
c0b2544ae9
commit
ab0674a1b6
@ -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