talons

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

commit 2032c913a77a1c55527152af1244a3b8cfda9a6f
parent 986e6f7c5fcaa4c605de1f8f259056e9d4ffa347
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Tue, 30 Aug 2016 10:03:06 +0200

Fix NULL pointer dereference in LDAP lookup code.

Fixes bug #3027.

Diffstat:
Msrc/ldapupdate.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ldapupdate.c b/src/ldapupdate.c @@ -407,7 +407,7 @@ Rdn *ldapsvr_modify_dn(GHashTable *hash, gchar *dn) { else { compare = g_hash_table_lookup(hash, rdn->attribute); /* if compare and rdn->attribute are equal then dn removed/empty */ - if (strcmp(compare, rdn->attribute) != 0) { + if (compare != NULL && strcmp(compare, rdn->attribute) != 0) { update_rdn(rdn, compare, rest); return rdn; }