From 4faa227a2d180762cf93c70a3e8bf3721baf3456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 11 Aug 2014 07:47:55 +0200 Subject: [PATCH] core: check that callback is not NULL in function string_replace_with_callback --- src/core/wee-string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 488d332dc..5cab4a35d 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -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);