talons

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

commit 8f03bca61aca398d2fb3733bde7c17990aab174e
parent bac407684aa94e3d41464ceb0596f41efc0b8440
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 @@ -363,7 +363,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)));