]> granicus.if.org Git - php/commitdiff
Fixed bug #50540 (Crash within ldap_first_reference function)
authorSriram Natarajan <srinatar@php.net>
Mon, 21 Dec 2009 20:39:48 +0000 (20:39 +0000)
committerSriram Natarajan <srinatar@php.net>
Mon, 21 Dec 2009 20:39:48 +0000 (20:39 +0000)
NEWS
ext/ldap/ldap.c

diff --git a/NEWS b/NEWS
index 5a631a458ae6da132624ee5772a2ac81ba763647..06a630bf08fb99c525ce7152652f5967c3ece5ae 100644 (file)
--- 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 <stdbool.h> is valid only in a c99 compilation 
index c1ca6c2f42b463e1e200a122e42826d29b7c341f..696814e215899929fd4a62bc94770a3e7b64a585 100644 (file)
@@ -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;
        }
 }
 /* }}} */