core: check that callback is not NULL in function string_replace_with_callback

This commit is contained in:
Sébastien Helleu 2014-08-11 07:47:55 +02:00
parent 8ab538c0d9
commit 4faa227a2d

View File

@ -2661,7 +2661,7 @@ string_replace_with_callback (const char *string,
*errors = 0;
if (!string || !prefix || !prefix[0] || !suffix || !suffix[0])
if (!string || !prefix || !prefix[0] || !suffix || !suffix[0] || !callback)
return NULL;
length_prefix = strlen (prefix);