Add check for a NULL parameter to extract_address(), to prevent possible null pointer...
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 1 Aug 2014 08:28:52 +0000 (10:28 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 1 Aug 2014 08:28:52 +0000 (10:28 +0200)
src/common/utils.c

index 8382176..9b9b1f8 100644 (file)
@@ -926,6 +926,7 @@ gchar *strchr_with_skip_quote(const gchar *str, gint quote_chr, gint c)
 
 void extract_address(gchar *str)
 {
 
 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, '"', '<', '>');
        eliminate_address_comment(str);
        if (strchr_with_skip_quote(str, '"', '<'))
                extract_parenthesis_with_skip_quote(str, '"', '<', '>');