From 20cd29d0a2de37c8e08f57a3b60704863ca12d8a Mon Sep 17 00:00:00 2001 From: Sriram Natarajan Date: Mon, 21 Dec 2009 20:39:48 +0000 Subject: [PATCH] Fixed bug #50540 (Crash within ldap_first_reference function) --- NEWS | 2 ++ ext/ldap/ldap.c | 2 ++ 2 files changed, 4 insertions(+) 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; } } /* }}} */ -- 2.40.0