From 3ffbb85cb973531ed6c39849170250311f53906b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 28 Jul 2014 08:27:16 +0200 Subject: core: check that string is not NULL in function string_input_for_buffer --- src/core/wee-string.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/core/wee-string.c b/src/core/wee-string.c index e29340298..4c893c9f5 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -2585,6 +2585,9 @@ string_input_for_buffer (const char *string) { char *pos_slash, *pos_space, *next_char; + if (!string) + return NULL; + /* special case for C comments pasted in input line */ if (strncmp (string, "/*", 2) == 0) return string; -- cgit v1.2.3