From: Sriram Natarajan Date: Mon, 21 Dec 2009 20:39:48 +0000 (+0000) Subject: Fixed bug #50540 (Crash within ldap_first_reference function) X-Git-Tag: php-5.3.2RC1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20cd29d0a2de37c8e08f57a3b60704863ca12d8a;p=php Fixed bug #50540 (Crash within ldap_first_reference function) --- diff --git a/NEWS b/NEWS index 5a631a458a..06a630bf08 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,8 @@ PHP NEWS - Fixed memory leak in extension loading when an error occurs on Windows. (Pierre) +- Fixed bug #50540 (Crash while running ldap_next_reference test cases). + (Sriram) - Fixed bug #50508 (compile failure: Conflicting HEADER type declarations). (Jani) - Fixed bug #50496 (Use of is valid only in a c99 compilation diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index c1ca6c2f42..696814e215 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1911,6 +1911,7 @@ PHP_FUNCTION(ldap_first_reference) resultentry->id = Z_LVAL_P(result); zend_list_addref(resultentry->id); resultentry->data = entry; + resultentry->ber = NULL; } } /* }}} */ @@ -1939,6 +1940,7 @@ PHP_FUNCTION(ldap_next_reference) resultentry_next->id = resultentry->id; zend_list_addref(resultentry->id); resultentry_next->data = entry_next; + resultentry_next->ber = NULL; } } /* }}} */