ldap: Fix crash in case of empty LDAP response for CRL fetch
In case of an empty LDAP result during a CRL fetch (for example, due to a wrong filter attribute in the LDAP URI, or invalid LDAP configuration), the call to ldap_result2error() with NULL value for "entry" lead to a crash. Closes strongswan/strongswan#52.
This commit is contained in:
committed by
Tobias Brunner
parent
bd815325a6
commit
5f97b73554
@@ -93,8 +93,7 @@ static bool parse(LDAP *ldap, LDAPMessage *result, chunk_t *response)
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG1(DBG_LIB, "finding first LDAP entry failed: %s",
|
||||
ldap_err2string(ldap_result2error(ldap, entry, 0)));
|
||||
DBG1(DBG_LIB, "finding first LDAP entry failed");
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user