talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 1803265b185cb02c3e6b57e569e4e7653c8541d9
parent 4228ee62e4b793eb7ee536b8eb386a8b272af540
Author: wwp <subscript@free.fr>
Date:   Wed,  6 Oct 2021 09:53:47 +0200

Fix CID 1491379: dereference before null check.

Diffstat:
Msrc/addrcustomattr.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/addrcustomattr.c b/src/addrcustomattr.c @@ -360,7 +360,8 @@ static void custom_attr_window_add_attr(void) { gchar *new_attr = gtk_editable_get_chars(GTK_EDITABLE(custom_attr_window.add_entry), 0, -1); - g_strstrip(new_attr); + if (new_attr) + g_strstrip(new_attr); if (new_attr && *new_attr) { GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(custom_attr_window.attr_list)));