From 60c76963534ec1788947683973a86de77ccf1bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 5 Jul 2014 10:03:15 +0200 Subject: core: check that string is not NULL in function string_convert_escaped_chars --- 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 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) -- cgit v1.2.3