Bug #9793 Updated: ldap_mod_add with bad params cause Segfault

From: Date: Tue, 03 Jul 2001 18:26:16 +0000
Subject: Bug #9793 Updated: ldap_mod_add with bad params cause Segfault
Groups: php.dev 
Request: Send a blank email to php-dev+get-58808@lists.php.net to get a copy of this message
ID: 9793 Updated by: sniper Reported By: ondrej@sury.cz Old-Status: Feedback Status: Analyzed Bug Type: LDAP related Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: I made a little mistake. This can be reproduced when ldap extension is compiled as shared extension. --Jani Previous Comments: --------------------------------------------------------------------------- [2001-07-03 04:53:29] derick@php.net No feedback --------------------------------------------------------------------------- [2001-06-04 00:13:33] sniper@php.net Please try the latest release candidate from: http://www.php.net/~andi/php-4.0.6RC2.tar.gz Also, try generating a GDB backtrace if it still crashes. (I'm still unable to reproduce this..) --Jani --------------------------------------------------------------------------- [2001-03-19 03:33:21] ondrej@sury.cz Bug Database <php-dev@lists.php.net> writes: > I can't reproduce this. Which ldap library are you using? > OpenLdap? And version? I tried with openldap 2.0.7 and > it just gave an error on that first example. I should have been more descriptive. libraries are openldap 2.0.7. Complete script is here and it's strace is attached: <?php if (!extension_loaded("ldap")) { dl("ldap.so"); } $_ldap = ldap_connect("127.0.0.1"); ldap_bind($_ldap, "cn=admin,ou=People,dc=globe,dc=cz", "admin"); ldap_mod_add($_ldap, "cn=admin,ou=People,dc=globe,dc=cz", Array("mail" => Array("1" => "admin@globe.cz"))); ldap_close($_ldap); ?> Output was: ondrej@druid:~$ php4 ldap.php Segmentation fault --------------------------------------------------------------------------- [2001-03-16 13:50:16] sniper@php.net I can't reproduce this. Which ldap library are you using? OpenLdap? And version? I tried with openldap 2.0.7 and it just gave an error on that first example. --Jani --------------------------------------------------------------------------- [2001-03-16 11:48:02] ondrej@sury.cz This cause SegFault: ldap_mod_add($param, $dn, Array("mail" => Array("1" => "info@php.net"))); This one works ok: ldap_mod_add($param, $dn, Array("mail" => Array("0" => "info@php.net"))); --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9793&edit=2

« previous php.dev (#58808) next »