summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-07-28 08:27:16 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-07-28 08:27:16 +0200
commit3ffbb85cb973531ed6c39849170250311f53906b (patch)
tree7ea9c407c0db9832fb6dab9e070acc0e9b6e76e9 /src
parent12c8cd49882c8cdb684f782f9e8e18125fef0d08 (diff)
downloadweechat-3ffbb85cb973531ed6c39849170250311f53906b.zip
core: check that string is not NULL in function string_input_for_buffer
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-string.c3
1 files changed, 3 insertions, 0 deletions
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;