[balsa] address: Avoid possible use-after-free



commit 0a0ae4078b8f4c093b8f043303d6c851cd82ef5f
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Jun 4 12:16:57 2019 -0400

    address: Avoid possible use-after-free

 libbalsa/address.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/libbalsa/address.c b/libbalsa/address.c
index 84d278481..6c3f86061 100644
--- a/libbalsa/address.c
+++ b/libbalsa/address.c
@@ -478,7 +478,9 @@ libbalsa_address_new_from_vcard(const gchar *str, const gchar *charset)
 
                 g_free(name);
                 g_free(last_name);
+                last_name = NULL;
                 g_free(first_name);
+                first_name = NULL;
                 name = libbalsa_address_extract_name(line + 2,
                                                      &last_name, &first_name);
                 name = validate_vcard_string(name, charset);


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