From: foobar Date: Fri, 28 Jul 2000 22:39:22 +0000 (+0000) Subject: Fixes bug which caused crash, if result_entry wasn't valid. X-Git-Tag: PRE_FILE_COMPILE_API_CHANGE~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c84d6a082f4ce5be50b264ce1d5a605768a2538;p=php Fixes bug which caused crash, if result_entry wasn't valid. --- diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index ca28c193f1..c25d19cce3 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -978,11 +978,12 @@ PHP_FUNCTION(ldap_get_values_len) WRONG_PARAM_COUNT; } - if ((ldap = _get_ldap_link(link)) == NULL) { - RETURN_FALSE; - } - + ldap = _get_ldap_link(link); + if (ldap == NULL) RETURN_FALSE; + ldap_result_entry = _get_ldap_result_entry(result_entry); + if (ldap_result_entry == NULL) RETURN_FALSE; + convert_to_string_ex(attr); attribute = (*attr)->value.str.val;