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
This commit is contained in:
Jeffrey Altman
2016-11-14 16:33:51 -05:00
parent 95c2940a02
commit 19e8852697

View File

@@ -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 */
}