[balsa/gmime3: 41/50] Guard against passing NULL name



commit e3ac633c53bdb3efb16c14ff10e7674dc5bb16d2
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 86bae0c8c..115332af8 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]