BUGFIX: #797 - gettoks did not protect against NULL pointer input
This commit is contained in:
parent
a478507b5f
commit
70c52aa96d
|
|
@ -596,6 +596,10 @@ gettoks(char *s)
|
||||||
list = NULL;
|
list = NULL;
|
||||||
prevp = &list;
|
prevp = &list;
|
||||||
|
|
||||||
|
if (!s) {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
/* stripWhite.... uses copy() to return a malloc'ed s, so we have to free it,
|
/* stripWhite.... uses copy() to return a malloc'ed s, so we have to free it,
|
||||||
using s0 as its starting address */
|
using s0 as its starting address */
|
||||||
if (strchr(s, '('))
|
if (strchr(s, '('))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue