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



commit e4909bbb50e72e6e08c177bab478064a818787e5
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]