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 8382176a76e9d57f4249d5a3e068df2bb5e1ebb3..9b9b1f8c8ecb4e462b74f83d214dcc6ba2821636 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, '"', '<', '>');