Avoid passing uninitialized stack to addelem() if called with an empty arg.
PR: bin/171174
This commit is contained in:
parent
9a6a13d687
commit
4285666880
@ -889,8 +889,8 @@ add_list(struct listinfo *inf, const char *argp)
|
|||||||
int toolong;
|
int toolong;
|
||||||
char elemcopy[PATH_MAX];
|
char elemcopy[PATH_MAX];
|
||||||
|
|
||||||
if (*argp == 0)
|
if (*argp == '\0')
|
||||||
inf->addelem(inf, elemcopy);
|
inf->addelem(inf, argp);
|
||||||
while (*argp != '\0') {
|
while (*argp != '\0') {
|
||||||
while (*argp != '\0' && strchr(W_SEP, *argp) != NULL)
|
while (*argp != '\0' && strchr(W_SEP, *argp) != NULL)
|
||||||
argp++;
|
argp++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user