summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-07-05 10:03:15 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-07-05 10:03:15 +0200
commit60c76963534ec1788947683973a86de77ccf1bbe (patch)
treee42c45d5b71646937af0a4f1dba0eafffaf0f691 /src
parent8fc8cbc12922245c103a6c8024584c7731af80d3 (diff)
downloadweechat-60c76963534ec1788947683973a86de77ccf1bbe.zip
core: check that string is not NULL in function string_convert_escaped_chars
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 8b47f30c3..b813669f0 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -619,6 +619,9 @@ string_convert_escaped_chars (const char *string)
int pos_output, i, length;
unsigned int value;
+ if (!string)
+ return NULL;
+
/* the output length is always <= to string length */
output = malloc (strlen (string) + 1);
if (!output)