diff --git a/src/misc/string.c b/src/misc/string.c index 56412e24a..be28aa0ee 100644 --- a/src/misc/string.c +++ b/src/misc/string.c @@ -443,6 +443,9 @@ gettok_node(char **s) char *token ; /* return token */ SPICE_DSTRING buf ; /* allow any length string */ + if (*s == NULL) + return NULL; + while (isspace(**s) || ( **s == '(' ) || ( **s == ')' ) ||