pollita Sat Sep 13 13:31:26 2003 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/ldap ldap.c
/php-src NEWS
Log:
MFH(r-1.147): Fix Bug #25525 ldap_explode_dn() crashes when passed invalid params
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.130.2.5 php-src/ext/ldap/ldap.c:1.130.2.6
--- php-src/ext/ldap/ldap.c:1.130.2.5 Thu Aug 28 16:01:28 2003
+++ php-src/ext/ldap/ldap.c Sat Sep 13 13:31:24 2003
@@ -22,7 +22,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ldap.c,v 1.130.2.5 2003/08/28 20:01:28 iliaa Exp $ */
+/* $Id: ldap.c,v 1.130.2.6 2003/09/13 17:31:24 pollita Exp $ */
#define IS_EXT_MODULE
#ifdef HAVE_CONFIG_H
@@ -286,7 +286,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.130.2.5 2003/08/28
20:01:28 iliaa Exp $" );
+ php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.130.2.6 2003/09/13
17:31:24 pollita Exp $" );
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -1208,7 +1208,10 @@
convert_to_string_ex(dn);
convert_to_long_ex(with_attrib);
- ldap_value = ldap_explode_dn(Z_STRVAL_PP(dn), Z_LVAL_PP(with_attrib));
+ if (!(ldap_value = ldap_explode_dn(Z_STRVAL_PP(dn), Z_LVAL_PP(with_attrib)))) {
+ /* Invalid parameters were passed to ldap_explode_dn */
+ RETURN_FALSE;
+ }
i=0;
while(ldap_value[i] != NULL) i++;
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.394 php-src/NEWS:1.1247.2.395
--- php-src/NEWS:1.1247.2.394 Thu Sep 11 21:32:37 2003
+++ php-src/NEWS Sat Sep 13 13:31:25 2003
@@ -7,6 +7,8 @@
- Fixed crash bug when non-existing save/serializer handler was used. (Jani)
- Fixed memory leak in gethostbynamel() if an error occurs. (Sara)
- Fixed FastCGI being unable to bind to a specific IP. (Sascha)
+- Fixed bug #25525 (ldap_explode_dn() crashes when passed invalid dn).
+ (Sara, patch by: mikael dot suvi at trigger dot ee)
- Fixed bug #25504 (pcre_match_all() crashes when passed only 2 parameters).
(Jani)
- Fixed bug #25494 (array_merge*() allows non-arrays as argument). (Jay)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php