Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46171 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92136 invoked from network); 24 Nov 2009 13:46:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2009 13:46:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=michael@no-surprises.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=michael@no-surprises.co.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain no-surprises.co.uk designates 80.68.93.37 as permitted sender) X-PHP-List-Original-Sender: michael@no-surprises.co.uk X-Host-Fingerprint: 80.68.93.37 river.mgdm.net Received: from [80.68.93.37] ([80.68.93.37:47420] helo=river.mgdm.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/9A-29930-0B3EB0B4 for ; Tue, 24 Nov 2009 08:46:25 -0500 Received: from [10.1.10.110] (emcukhs1.plus.com [84.92.198.99]) (Authenticated sender: michael) by river.mgdm.net (Postfix) with ESMTPSA id 8596F28074 for ; Tue, 24 Nov 2009 13:46:21 +0000 (GMT) Message-ID: <4B0BE3B5.1030606@no-surprises.co.uk> Date: Tue, 24 Nov 2009 13:46:29 +0000 User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: multipart/mixed; boundary="------------090009050208080107030100" Subject: [PATCH] potential null dereference in ext/ftp/ftp.c From: michael@no-surprises.co.uk (Michael Maclean) --------------090009050208080107030100 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 --------------090009050208080107030100 Content-Type: text/plain; name="ftp-patch.txt" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="ftp-patch.txt" SW5kZXg6IGV4dC9mdHAvZnRwLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gZXh0L2Z0cC9mdHAuYyAg ICAgICAocmV2aXNpb24gMjkxMjYxKQorKysgZXh0L2Z0cC9mdHAuYyAgICAgICAod29ya2lu ZyBjb3B5KQpAQCAtMTY5OSw3ICsxNjk5LDcgQEAKICAgICAgICBjaGFyICAgICAgICAgICAg ICAgICAgICBhcmdbMTFdOwogCiAgICAgICAgaWYgKGZ0cCA9PSBOVUxMKSB7Ci0gICAgICAg ICAgICAgICBnb3RvIGJhaWw7CisgICAgICAgICAgICAgICByZXR1cm4gUEhQX0ZUUF9GQUlM RUQ7CiAgICAgICAgfQogCiAgICAgICAgaWYgKCFmdHBfdHlwZShmdHAsIHR5cGUpKSB7Cg== --------------090009050208080107030100--