From 19e8852697275e61e8fce438e4ddeb9bee8d74f2 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 14 Nov 2016 16:33:51 -0500 Subject: [PATCH] hdb: hdb_ldap_common NULL dereference In hdb_ldap_common() the test if (search_base == NULL && search_base[0] == '\0') error handling ... must be if (search_base == NULL || search_base[0] == '\0') error handling ... Change-Id: I8d876a9c56833431b3c4b582fbb0a8cc7353893d --- lib/hdb/hdb-ldap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hdb/hdb-ldap.c b/lib/hdb/hdb-ldap.c index c6f0a5959..3add67bf3 100644 --- a/lib/hdb/hdb-ldap.c +++ b/lib/hdb/hdb-ldap.c @@ -1905,7 +1905,7 @@ hdb_ldap_common(krb5_context context, url = p; } - if (search_base == NULL && search_base[0] == '\0') { + if (search_base == NULL || search_base[0] == '\0') { krb5_set_error_message(context, ENOMEM, "ldap search base not configured"); return ENOMEM; /* XXX */ }