From 7c116e6b9c55cf08a8010a5919066207b82e3859 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Thu, 30 May 2013 10:29:22 +0200 Subject: Prevent segfault while processing ASQ request https://fedorahosted.org/sssd/ticket/1950 --- src/providers/ldap/sdap_async.c | 6 ++++++ 1 file changed, 6 insertions(+) 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++) { -- cgit