diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2013-05-30 10:29:22 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-30 17:50:06 +0200 |
commit | 7c116e6b9c55cf08a8010a5919066207b82e3859 (patch) | |
tree | 94f33effd53c9bdfe16466a17b542816ced6718e | |
parent | 593c4a91596640eafe798e8aac700d0f3ce7ba37 (diff) | |
download | sssd-7c116e6b9c55cf08a8010a5919066207b82e3859.tar.gz sssd-7c116e6b9c55cf08a8010a5919066207b82e3859.tar.bz2 sssd-7c116e6b9c55cf08a8010a5919066207b82e3859.zip |
Prevent segfault while processing ASQ request
https://fedorahosted.org/sssd/ticket/1950
-rw-r--r-- | src/providers/ldap/sdap_async.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c index b2bf0360..a20905e9 100644 --- a/src/providers/ldap/sdap_async.c +++ b/src/providers/ldap/sdap_async.c @@ -1970,6 +1970,12 @@ static errno_t sdap_asq_search_parse_entry(struct sdap_handle *sh, /* Find all suitable maps in the list */ vals = ldap_get_values_len(sh->ldap, msg->msg, "objectClass"); + if (!vals) { + DEBUG(SSSDBG_OP_FAILURE, + ("Unknown entry type, no objectClass found for DN [%s]!\n", dn)); + ret = EINVAL; + goto done; + } for (mi =0; mi < state->num_maps; mi++) { map = NULL; for (i = 0; vals[i]; i++) { |