Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46187 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41386 invoked from network); 25 Nov 2009 12:32:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2009 12:32:42 -0000 Authentication-Results: pb1.pair.com header.from=jess@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jess@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.185 as permitted sender) X-PHP-List-Original-Sender: jess@zend.com X-Host-Fingerprint: 212.25.124.185 il-mr1.zend.com Received: from [212.25.124.185] ([212.25.124.185:36024] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/98-33335-7E32D0B4 for ; Wed, 25 Nov 2009 07:32:41 -0500 Received: from il-gw1.zend.com (unknown [10.1.1.21]) by il-mr1.zend.com (Postfix) with ESMTP id 747E05047F; Wed, 25 Nov 2009 14:19:20 +0200 (IST) Received: from [10.1.2.102] ([10.1.2.102]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 25 Nov 2009 14:32:36 +0200 Message-ID: <4B0D23E4.4070305@zend.com> Date: Wed, 25 Nov 2009 14:32:36 +0200 User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Michael Maclean CC: internals@lists.php.net References: <4B0BE3B5.1030606@no-surprises.co.uk> In-Reply-To: <4B0BE3B5.1030606@no-surprises.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Nov 2009 12:32:36.0795 (UTC) FILETIME=[5EB158B0:01CA6DCB] Subject: Re: [PHP-DEV] [PATCH] potential null dereference in ext/ftp/ftp.c From: jess@zend.com (Jess Portnoy) Hello, clang is indeed a great tool but since it does a lot more than just static analysis. For those cases where one wants source code analysis, especially security oriented, I'd recommend flawfinder [http://www.dwheeler.com/flawfinder]. This is a very good tool and it exists in the official repos for Debian, Ubuntu and FC [and probably many others but these I checked]. It can operate on both C and C++ source files [less relevant for the PHP engine but good to know, right?]. I ran it against the PHP 5.2.11 sources and am now sorting through results, patching suggestions may follow :) May the source be with you, Best regards, Jess Portnoy Michael Maclean wrote: > Hi, > Gwynne pointed me at the clang static analyser earlier on today, and so > I've run it against current PHP_5_3. In the course of messing with it, > it noticed a potential null dereference in ext/ftp - I've attached a > one-liner to fix it. > > Michael >