ID: 9793
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: LDAP related
Description: ldap_mod_add with bad params cause Segfault

Bug Database <[EMAIL PROTECTED]> 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" => "[EMAIL PROTECTED]")));
 ldap_close($_ldap);
 ?>

Output was:
 ondrej@druid:~$ php4 ldap.php 
 Segmentation fault


Previous Comments:
---------------------------------------------------------------------------

[2001-03-16 13:50:16] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
This cause SegFault:
ldap_mod_add($param, $dn, Array("mail" => Array("1" =>
"[EMAIL PROTECTED]")));


This one works ok:
ldap_mod_add($param, $dn, Array("mail" => Array("0" =>
"[EMAIL PROTECTED]")));


---------------------------------------------------------------------------


Full Bug description available at: http://bugs.php.net/?id=9793


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to