Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10781 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58551 invoked by uid 1010); 26 Jun 2004 08:24:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 58501 invoked from network); 26 Jun 2004 08:24:23 -0000 Received: from unknown (HELO colo.lerdorf.com) (66.198.51.121) by pb1.pair.com with SMTP; 26 Jun 2004 08:24:23 -0000 Received: from [192.168.0.17] ([213.182.149.107]) by colo.lerdorf.com (8.12.11/8.12.11/Debian-5) with ESMTP id i5Q8OIpb028090; Sat, 26 Jun 2004 01:24:19 -0700 Date: Sat, 26 Jun 2004 01:24:23 -0700 (PDT) X-X-Sender: rasmus@thinkpad.lerdorf.com To: Stefan Esser cc: internals@lists.php.net In-Reply-To: <40DC70CB.5010400@php.net> Message-ID: References: <40DC70CB.5010400@php.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on colo Subject: Re: [PHP-DEV] Input Filters - Bugs? - PHP4 Port From: rasmus@php.net (Rasmus Lerdorf) On Fri, 25 Jun 2004, Stefan Esser wrote: > am I correct in assuming that input_filters are allowed todo whatever > they want with the value? > > I am asking, because this is not properly documented and atleast the > mbstring extension violates this. > > First of all it feeds input_filter a value pointer that is NOT allocated > with emalloc and secondly it free()s the wrong address in case the > input_filter has erealloc()ated value (but most probably the erealloc() > will already crash because the memory is allocated with malloc() instead > of emalloc()) Yeah, this should probably be more strictly defined. I think I am probably the only one using this and my filters never grow the string so I don't have these problems. > And the second question is: Is there any argument against backporting > the input_filter functionality to PHP4? I do not know what the plans > are, but I doubt PHP4 will die out with the release of PHP5 and so the > question is if we partly backport new functionality for PHP4 from PHP5 > into PHP 4.4 No real porting necessary. This area of the code is identical in PHP4 and PHP5, so it would just be a matter of adding the hook. I am using this extensively with PHP4. -Rasmus