Avoid passing uninitialized stack to addelem() if called with an empty arg.

PR:		bin/171174
This commit is contained in:
Ed Maste 2012-08-29 21:38:34 +00:00
parent 9a6a13d687
commit 4285666880

View File

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