PHP 4.0 Bug #1980: httpd dumps core when using ldap_[read|search] with the fourth parameter
| From: | kenson at sentor dot se | Date: | Fri, 06 Aug 1999 09:17:06 +0000 |
| Subject: | PHP 4.0 Bug #1980: httpd dumps core when using ldap_[read|search] with the fourth parameter | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9593@lists.php.net to get a copy of this message | ||
From: kenson@sentor.se
Operating system: Linux 2.2.10/i686
PHP version: 4.0 Beta 1
PHP Bug Type: Other
Bug description: httpd dumps core when using ldap_[read|search] with the fourth parameter
This script crashes php:
<?
$ds=ldap_connect("use.your.own.server.here");
$r=ldap_bind($ds);
$sr=ldap_search($ds,"dc=sentor,dc=se","sn=Jansson",array("cn","mail"));
?>
our configure line:
./configure --with-mysql --with-apache=../apache_1.3.6 --enable-track-vars --with-ldap=/usr/local
Backtrace of SEGFAULT:
#0 zval_ptr_dtor (zval_ptr=0x816ec00) at zend_execute_API.c:212
#1 0x80afa9f in zend_hash_destroy (ht=0x816d5f8) at zend_hash.c:735
#2 0x80ac4a3 in zval_dtor (zvalue=0x816d7d8) at zend_variables.c:68
#3 0x80a77b7 in zval_ptr_dtor (zval_ptr=0x8165d1c) at zend_execute_API.c:214
#4 0x80a7eed in zend_ptr_stack_clear_multiple () at zend_execute_API.c:489
#5 0x80b634b in execute (op_array=0x81692e8) at zend_execute.c:1407
#6 0x807605c in php_execute_script (primary_file=0xbffff9ec) at main.c:1121
#7 0x80760f9 in apache_php_module_main (r=0x816353c, fd=19, display_source_mode=0)
at main.c:1163
#8 0x807466c in send_php ()
#9 0x80746c0 in send_parsed_php ()
#10 0x80bd133 in ap_invoke_handler ()
#11 0x80d2bd9 in process_request_internal ()
#12 0x80d2c3c in ap_process_request ()
#13 0x80c95e9 in child_main ()
#14 0x80c97a8 in make_child ()
#15 0x80c9933 in startup_children ()
#16 0x80c9fb4 in standalone_main ()
#17 0x80ca8d3 in main ()
Other info:
When stepping through php3_ldap_do_search() it looks like
_php3_hash_[num_elements|index_find] both returns broken data.