From c50dfa2be83b6df258c810cd1dc71ad947214803 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 14 Jun 2019 22:22:17 +0200 Subject: [PATCH] prevent crash if function is called with NULL argument --- src/misc/string.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/misc/string.c b/src/misc/string.c index 14d049514..19cecec10 100644 --- a/src/misc/string.c +++ b/src/misc/string.c @@ -319,6 +319,8 @@ gettok(char **s) char * nexttok(const char *s) { + if (!s) + return NULL; int paren = 0; s = skip_ws(s);