BUGFIX: #797 - gettoks did not protect against NULL pointer input

This commit is contained in:
Jason Pyeron 2025-07-23 10:01:49 +02:00 committed by Holger Vogt
parent a478507b5f
commit 70c52aa96d
1 changed files with 4 additions and 0 deletions

View File

@ -596,6 +596,10 @@ gettoks(char *s)
list = NULL;
prevp = &list;
if (!s) {
return list;
}
/* stripWhite.... uses copy() to return a malloc'ed s, so we have to free it,
using s0 as its starting address */
if (strchr(s, '('))