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:
Ruslan Ermilov 2001-10-04 09:02:10 +00:00
parent 6ea8d9af05
commit 9f619f7956

View File

@ -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;
}