wlist.c, wl_find(), avoid crash when `string' argument is NULL
This commit is contained in:
parent
e4e24f74e6
commit
52a1a58e14
|
|
@ -347,6 +347,9 @@ wl_chop_rest(wordlist *wl)
|
|||
wordlist *
|
||||
wl_find(const char *string, const wordlist *wl)
|
||||
{
|
||||
if (!string)
|
||||
return NULL;
|
||||
|
||||
for (; wl; wl = wl->wl_next)
|
||||
if (eq(string, wl->wl_word))
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue