Skip to content

Commit

Permalink
hdb: hdb_ldap_common NULL dereference
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jaltman committed Nov 14, 2016
1 parent 95c2940 commit 19e8852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hdb/hdb-ldap.c
Expand Up @@ -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 */
}
Expand Down

0 comments on commit 19e8852

Please sign in to comment.