From fbc022a77a53db568f7764ea65d8014127e5c107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 4 Aug 2019 13:30:53 +0200 Subject: [PATCH] core: return NULL immediately if string is NULL in function hook_modifier_exec --- src/core/hook/wee-hook-modifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hook/wee-hook-modifier.c b/src/core/hook/wee-hook-modifier.c index e9cb30904..af1cad1cd 100644 --- a/src/core/hook/wee-hook-modifier.c +++ b/src/core/hook/wee-hook-modifier.c @@ -92,7 +92,7 @@ hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier, /* make C compiler happy */ (void) plugin; - if (!modifier || !modifier[0]) + if (!modifier || !modifier[0] || !string) return NULL; new_msg = NULL;