Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31184 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20328 invoked by uid 1010); 23 Jul 2007 13:28:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 20313 invoked from network); 23 Jul 2007 13:28:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2007 13:28:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=jani.taskinen@sci.fi; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jani.taskinen@sci.fi; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sci.fi from 63.208.196.171 cause and error) X-PHP-List-Original-Sender: jani.taskinen@sci.fi X-Host-Fingerprint: 63.208.196.171 outbound.mailhop.org FreeBSD 4.6-4.9 Received: from [63.208.196.171] ([63.208.196.171:3063] helo=outbound.mailhop.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/CA-32314-B0DA4A64 for ; Mon, 23 Jul 2007 09:28:44 -0400 Received: from [81.22.163.71] (helo=[10.6.109.95]) by outbound.mailhop.org with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.63) (envelope-from ) id 1ICxxo-0000Z1-J8; Mon, 23 Jul 2007 09:28:40 -0400 X-MHO-User: U2FsdGVkX19NVpzadTlX5D+KPo5z7aeQigbHe2DeLFI= X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 81.22.163.71 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+vwiGCdGRsNWtlIH/PXT4+AGAEv3XpAX8= Reply-To: jani.taskinen@iki.fi To: Mattias Bengtsson Cc: internals@lists.php.net In-Reply-To: <20070721195731.GA29719@swx.se> References: <20070721195731.GA29719@swx.se> Content-Type: text/plain Date: Mon, 23 Jul 2007 16:28:38 +0300 Message-ID: <1185197318.3318.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] str_pad allows pad_length to be negative From: jani.taskinen@sci.fi (Jani Taskinen) Patch applied to both PHP_5_2 and HEAD. Thanks! --Jani On Sat, 2007-07-21 at 21:57 +0200, Mattias Bengtsson wrote: > As stated in the manual for str_pad() "If the value of pad_length is > negative or less than the length of the input string, no padding takes > place.". > > By using a very low negative value it is possible to bypass the check. > > Please see attachment. > > Cheers, Mattias Bengtsson > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php