Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44517 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48690 invoked from network); 27 Jun 2009 11:12:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jun 2009 11:12:53 -0000 Authentication-Results: pb1.pair.com header.from=johannes@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 83.243.58.134 as permitted sender) X-PHP-List-Original-Sender: johannes@php.net X-Host-Fingerprint: 83.243.58.134 mailout2.netbeat.de Linux 2.6 Received: from [83.243.58.134] ([83.243.58.134:57309] helo=mailout2.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/81-38693-2BEF54A4 for ; Sat, 27 Jun 2009 07:12:53 -0400 Received: (qmail 14414 invoked by uid 89); 27 Jun 2009 11:46:34 -0000 Received: from unknown (HELO ?192.168.1.102?) (johannes%schlueters.de@82.135.3.76) by mailout2.netbeat.de with ESMTPA; 27 Jun 2009 11:46:34 -0000 To: Andrei Zmievski Cc: PHP internals In-Reply-To: <4A453C43.3060806@gravitonic.com> References: <4A453C43.3060806@gravitonic.com> Content-Type: text/plain Date: Sat, 27 Jun 2009 13:12:41 +0200 Message-ID: <1246101161.13829.1.camel@goldfinger.johannes.nop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Memory corruption bug From: johannes@php.net (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Fri, 2009-06-26 at 14:23 -0700, Andrei Zmievski wrote: > I found what is effectively a memory corruption bug in all the branches. pecalloc() uses > the wrong length to zero out the memory. Patch is attached, although I'm somewhat > concerned about using just (nmemb*len) instead of something like safe_address(nmemb*len), > but safe_address() is inlined in zend_alloc.c not in the header file. > > We should apply this to 5.2/5.3 before the release. Agreed. johanes