Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4041 invoked by uid 1010); 3 Mar 2007 15:49:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4026 invoked from network); 3 Mar 2007 15:49:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Mar 2007 15:49:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=cardoe@gentoo.org; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cardoe@gentoo.org; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain gentoo.org does not designate 205.152.59.70 as permitted sender) X-PHP-List-Original-Sender: cardoe@gentoo.org X-Host-Fingerprint: 205.152.59.70 imf22aec.mail.bellsouth.net Received: from [205.152.59.70] ([205.152.59.70:16836] helo=imf22aec.mail.bellsouth.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/57-31769-A1999E54 for ; Sat, 03 Mar 2007 10:49:48 -0500 Received: from ibm67aec.bellsouth.net ([68.220.144.35]) by imf22aec.mail.bellsouth.net with ESMTP id <20070303154944.QAF18388.imf22aec.mail.bellsouth.net@ibm67aec.bellsouth.net> for ; Sat, 3 Mar 2007 10:49:44 -0500 Received: from [192.168.2.50] (really [68.220.144.35]) by ibm67aec.bellsouth.net with ESMTP id <20070303154943.VQZV1612.ibm67aec.bellsouth.net@[192.168.2.50]>; Sat, 3 Mar 2007 10:49:43 -0500 Message-ID: <45E99912.7010406@gentoo.org> Date: Sat, 03 Mar 2007 10:49:38 -0500 User-Agent: Thunderbird 1.5.0.9 (X11/20061222) MIME-Version: 1.0 To: Antony Dovgal CC: internals@lists.php.net References: <40059.216.155.111.10.1172694790.squirrel@webmail.cardoe.com> <45E5EA50.3070800@zend.com> <33449.216.155.111.10.1172696679.squirrel@webmail.cardoe.com> <45E5F067.3020709@zend.com> <58735.216.155.111.10.1172698524.squirrel@webmail.cardoe.com> <45E5F83F.7080308@zend.com> <57226.216.155.111.10.1172700676.squirrel@webmail.cardoe.com> <45E695CB.3070104@zend.com> In-Reply-To: <45E695CB.3070104@zend.com> X-Enigmail-Version: 0.94.2.0 OpenPGP: id=8B4264CB; url=http://dev.gentoo.org/~cardoe/cardoe.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2E8B765766DE28DA15BEFF2F" Subject: Re: [PHP-DEV] LDAP functions implemented poorly From: cardoe@gentoo.org (Doug Goldstein) --------------enig2E8B765766DE28DA15BEFF2F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Antony Dovgal wrote: > On 03/01/2007 01:11 AM, Doug Goldstein wrote: >> Antony Dovgal wrote: >>> On 03/01/2007 12:35 AM, Doug Goldstein wrote: >>>>> Did you really test it with non-NULL terminated strings? >>>>> Don't you need to add '\0' manually? >>>> >>>> The test is that you run the example code from bug #38819, watch PHP= >>>> crash. Apply my patch and watch PHP not crash. Fairly simple. My >>>> backtrace >>>> is identical to the reporter's. >>> >>> Well, I can't do it myself since I don't even have a LDAP server >>> installed. >>> That's why I asked you the question. >>> >>>> If you read the comments by the OpenLDAP developers in the two bugs >>>> referenced they have the same reason for using ldap_get_values_len()= >>>> instead of ldap_get_values() because it's safer incase the data is >>>> non-NULL terminated data. In this case PHP's assumption that it's NU= LL >>>> terminated is flawed since it's crashing since it's extending past t= he >>>> end >>>> of it's memory segment. (as visible from bug #38819) >>> >>> I have no doubts it's true, but the question was: >>> did you really test [the NEW patched version of] the code with non-NU= LL >>> terminated strings? >> >> If I run the example PHP code from bug #38819, PHP will merrily run of= f >> the end of a string into no man's land and crash as per the backtrace = in >> bug #38819. With the patch applied, it does not. That sound clearly li= ke >> the example PHP code in bug #38819 is testing it with a non-NULL >> terminated string. I hope this is clear. >=20 > Yes, that's perfectly clear, thanks. >=20 So any word about this getting merged for PHP 5.2.2? --=20 Doug Goldstein http://dev.gentoo.org/~cardoe/ --------------enig2E8B765766DE28DA15BEFF2F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF6ZkWoeSe8B0zEfwRAnsLAJ4sgIgXZ8U30JLE7MeNQwnTyxYR9QCfdv4i U0g6do/KeODyGmNNDRuToMI= =s+le -----END PGP SIGNATURE----- --------------enig2E8B765766DE28DA15BEFF2F--