core: check that string is not NULL in function string_convert_escaped_chars

v2.8-utf8proc
Sébastien Helleu 2014-07-05 10:03:15 +02:00
parent 8fc8cbc129
commit 60c7696353
1 changed files with 3 additions and 0 deletions

View File

@ -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)