Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14219 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31128 invoked by uid 1010); 28 Dec 2004 15:45:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29638 invoked by uid 1007); 28 Dec 2004 15:44:59 -0000 Message-ID: <20041228154459.29637.qmail@pb1.pair.com> To: internals@lists.php.net Date: Tue, 28 Dec 2004 16:44:59 +0100 Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Posted-By: 62.58.68.2 Subject: base64_encode() memory issue From: r.korving@xit.nl ("Ron Korving") 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