Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14233 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49405 invoked by uid 1010); 30 Dec 2004 01:44:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49356 invoked from network); 30 Dec 2004 01:44:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Dec 2004 01:44:47 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.4/2.6 Received: from ([80.74.107.235:51840] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTP id 20/CB-65170-C8D53D14 for ; Wed, 29 Dec 2004 20:44:47 -0500 Received: (qmail 16587 invoked from network); 30 Dec 2004 01:44:39 -0000 Received: from localhost (HELO andi-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 30 Dec 2004 01:44:39 -0000 Message-ID: <5.1.0.14.2.20041229174350.02ed81c0@localhost> X-Sender: andi@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 29 Dec 2004 17:44:34 -0800 To: "Ron Korving" ,internals@lists.php.net In-Reply-To: <20041228154459.29637.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] base64_encode() memory issue From: andi@zend.com (Andi Gutmans) References: <20041228154459.29637.qmail@pb1.pair.com> Do you have a patch which you think should be applied? If not, can you send a reproducing script (a short one). Maybe you want to run it through valgrind and see where the damage is done. Andi At 04:44 PM 12/28/2004 +0100, Ron Korving wrote: >Hi, > >I'm not sure how to test what I noticed, so I figured I would post this here >and see if any of you could test it and see if I'm correct. When I test this >in a non-PHP environment with malloc(), this does present a problem however, >and when running segfaults randomly appear because of it. > >In base64.c, the string is closed with a \0 byte, but this one byte is never >allocated. Since it's just 1 byte, this often happens without causing >trouble, but every once in a while it does cause a segfault. I hope someone >can confirm this. > >Happy holidays, > >Ron > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php