[balsa/gmime3: 40/49] Guard against passing NULL name



commit 574f7f27f82990f02a560492e3aaf3926b9813f5
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Nov 24 18:02:44 2019 -0500

    Guard against passing NULL name
    
    to internet_address_list_parse().
    
    modified:   libbalsa/address-view.c

 libbalsa/address-view.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libbalsa/address-view.c b/libbalsa/address-view.c
index ec7578e32..7e003cf84 100644
--- a/libbalsa/address-view.c
+++ b/libbalsa/address-view.c
@@ -1254,10 +1254,10 @@ libbalsa_address_view_get_list(LibBalsaAddressView * address_view,
                            ADDRESS_TYPE_COL, &this_type,
                            ADDRESS_NAME_COL, &name, -1);
 
-        if (this_type == type) {
+        if (this_type == type && name != NULL) {
             InternetAddressList *tmp_list =
                 internet_address_list_parse(libbalsa_parser_options(), name);
-            if (tmp_list) {
+            if (tmp_list != NULL) {
                 internet_address_list_append(address_list, tmp_list);
                 g_object_unref(tmp_list);
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]