From 71e39607218b5801da5c30084633f821492b7c33 Mon Sep 17 00:00:00 2001 From: Andrej Kacian Date: Fri, 1 Aug 2014 10:28:52 +0200 Subject: [PATCH] Add check for a NULL parameter to extract_address(), to prevent possible null pointer dereference. --- src/common/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/utils.c b/src/common/utils.c index 8382176a7..9b9b1f8c8 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -926,6 +926,7 @@ gchar *strchr_with_skip_quote(const gchar *str, gint quote_chr, gint c) void extract_address(gchar *str) { + cm_return_if_fail(str != NULL); eliminate_address_comment(str); if (strchr_with_skip_quote(str, '"', '<')) extract_parenthesis_with_skip_quote(str, '"', '<', '>'); -- 2.25.1