talons

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

commit 542c66f3f813801b9eeab84432d2e01e4a890aee
parent 47d362fb39527b0f100cdc8c247a472767b6554e
Author: Colin Leroy <colin@colino.net>
Date:   Thu,  8 Oct 2015 19:08:42 +0200

Fix null pointer dereference

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

diff --git a/src/addr_compl.c b/src/addr_compl.c @@ -187,7 +187,9 @@ static gint weight_addr_match(const address_entry* addr) gint a_weight = addr->address ? strlen(addr->address) : n_weight; gchar* match = NULL; - match = strcasestr(addr->name, g_completion_prefix); + if (addr->name) + match = strcasestr(addr->name, g_completion_prefix); + if (match != NULL) { if (match == addr->name) n_weight = -4;