diff options
author | foobar <sniper@php.net> | 2000-07-28 22:39:22 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2000-07-28 22:39:22 +0000 |
commit | 7c84d6a082f4ce5be50b264ce1d5a605768a2538 (patch) | |
tree | 94e23304acf9b186a5d4497a0d5c256ab872a3e8 /ext/ldap | |
parent | 9f25b9c1f7f81932d91a423c493360e7507dbff0 (diff) | |
download | php-git-7c84d6a082f4ce5be50b264ce1d5a605768a2538.tar.gz |
Fixes bug which caused crash, if result_entry wasn't valid.
Diffstat (limited to 'ext/ldap')
-rw-r--r-- | ext/ldap/ldap.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; |