From e75fef58c4f9365b83a8b42036407cd4622bdbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 5 Jul 2014 10:05:35 +0200 Subject: [PATCH] core: check that "chars" argument is not NULL in function string_strip --- 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 b813669f0..119ac6fc3 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -560,7 +560,7 @@ string_strip (const char *string, int left, int right, const char *chars) if (!string) return NULL; - if (!string[0]) + if (!string[0] || !chars) return strdup (string); ptr_start = string;