php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9793 ldap_mod_add with bad params cause Segfault
Submitted: 2001-03-16 11:48 UTC Modified: 2001-11-23 17:46 UTC
From: ondrej at sury dot cz Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.0.4pl1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ondrej at sury dot cz
New email:
PHP Version: OS:

 

 [2001-03-16 11:48 UTC] ondrej at sury dot 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")));

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-16 13:50 UTC] 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-19 03:33 UTC] ondrej at sury dot 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-06-04 00:13 UTC] 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-07-03 04:53 UTC] derick@php.net
No feedback
 [2001-07-03 14:26 UTC] sniper@php.net
I made a little mistake. This can be reproduced when ldap extension is compiled as shared extension.

--Jani


 [2001-11-23 17:46 UTC] venaas@php.net
I'm pretty sure I've fixed this in CVS a couple of weeks
or so ago, you are now required to use 0, 1, ... Please
try latest CVS or a snapshot from snaps.php.net. Reopen
if I'm wrong.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC