Re: ldap_first_attribute() and ldap_next_attribute() broken in 4.1.0 RCs
| From: | Zeev Suraski | Date: | Sat, 01 Dec 2001 04:18:14 +0000 |
| Subject: | Re: ldap_first_attribute() and ldap_next_attribute() broken in 4.1.0 RCs | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72182@lists.php.net to get a copy of this message | ||
If it was broken for 6 months, it was broken in 4.0.6. It will be broken in 4.1.0, it's not grounds for breaking a final RC...
Zeev
At 01:43 01/12/2001, Stig Venaas wrote:
I was by accident looking at the ldap_first_attribute() code and realized that something was wrong. Turns out that it has been broken for 6 months without anyone noticing! I've done a lot of LDAP testing, but I've not been using ldap_first_attribute() and ldap_next_attribute(). I know accidents easily happens, but I wish people would test when they change things. I think the patch below fixes it. Could we apply the same patch to 4.1.0? I don't think we can release 4.1.0 without these functions working, and this fix shouldn't affect anything but those functions. Stig ----- Forwarded message from Stig Venaas <Stig.Venaas@uninett.no> ----- Mailing-List: contact php-cvs-help@lists.php.net; run by ezmlm Precedence: bulk list-help: <mailto:php-cvs-help@lists.php.net> list-unsubscribe: <mailto:php-cvs-unsubscribe@lists.php.net> list-post: <mailto:php-cvs@lists.php.net> Delivered-To: mailing list php-cvs@lists.php.net From: "Stig Venaas" <Stig.Venaas@uninett.no> To: php-cvs@lists.php.net Date: Fri, 30 Nov 2001 23:37:44 -0000 Subject: [PHP-CVS] cvs: php4 /ext/ldap ldap.cvenaas Fri Nov 30 18:37:44 2001 EDTModified files:/php4/ext/ldap ldap.cLog: ldap_first_attribute and ldap_next_attribute has been completely broken for 6 months!! Fixed (I think), might be a memory leak there... Index: php4/ext/ldap/ldap.c diff -u php4/ext/ldap/ldap.c:1.107 php4/ext/ldap/ldap.c:1.108 --- php4/ext/ldap/ldap.c:1.107 Thu Nov 29 15:26:20 2001+++ php4/ext/ldap/ldap.c Fri Nov 30 18:37:43 2001@@ -22,7 +22,7 @@+----------------------------------------------------------------------+*/ -/* $Id: ldap.c,v 1.107 2001/11/29 20:26:20 venaas Exp $ */ +/* $Id: ldap.c,v 1.108 2001/11/30 23:37:43 venaas Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -232,6 +232,7 @@le_result = zend_register_list_destructors_ex(_free_ldap_result, NULL, "ldap result", module_number); le_link = zend_register_list_destructors_ex(_close_ldap_link, NULL, "ldap link", module_number); le_result_entry = zend_register_list_destructors_ex(NULL, NULL, "ldap result entry", module_number); + le_ber_entry = zend_register_list_destructors_ex(NULL, NULL, "ldap ber entry", module_number);Z_TYPE(ldap_module_entry) = type;@@ -275,7 +276,7 @@php_info_print_table_start(); php_info_print_table_row(2, "LDAP Support", "enabled" ); - php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.107 2001/11/29 20:26:20 venaas Exp $" ); + php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.108 2001/11/30 23:37:43 venaas Exp $" ); php_info_print_table_row(2, "Total Links", maxl );#ifdef LDAP_API_VERSION @@ -1001,7 +1002,7 @@if ((attribute = ldap_first_attribute(ld->link, ldap_result_entry, &ber)) == NULL) { RETURN_FALSE; } else { - ZEND_REGISTER_RESOURCE(return_value, ber, le_ber_entry); + ZEND_REGISTER_RESOURCE(*berp, ber, le_ber_entry);RETVAL_STRING(attribute, 1);#if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS @@ -1032,7 +1033,7 @@if ((attribute = ldap_next_attribute(ld->link, ldap_result_entry, ber)) == NULL) { RETURN_FALSE; } else { - ZEND_REGISTER_RESOURCE(return_value, ber, le_ber_entry); + ZEND_REGISTER_RESOURCE(*berp, ber, le_ber_entry);RETVAL_STRING(attribute, 1);#if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net ----- End forwarded message ----- -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net