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;
|
||||
char elemcopy[PATH_MAX];
|
||||
|
||||
if (*argp == 0)
|
||||
inf->addelem(inf, elemcopy);
|
||||
if (*argp == '\0')
|
||||
inf->addelem(inf, argp);
|
||||
while (*argp != '\0') {
|
||||
while (*argp != '\0' && strchr(W_SEP, *argp) != NULL)
|
||||
argp++;
|
||||
|
Loading…
Reference in New Issue
Block a user