Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68276 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6708 invoked from network); 22 Jul 2013 08:09:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2013 08:09:48 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.67 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.67 smtp67.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.67] ([108.166.43.67:60312] helo=smtp67.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/D2-26448-CC8ECE15 for ; Mon, 22 Jul 2013 04:09:48 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 57EE014812F for ; Mon, 22 Jul 2013 04:09:45 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp1.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 1D3271480C6 for ; Mon, 22 Jul 2013 04:09:45 -0400 (EDT) Message-ID: <51ECE8C8.7070001@sugarcrm.com> Date: Mon, 22 Jul 2013 01:09:44 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: phar bug #65028 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! I was looking at bug https://bugs.php.net/bug.php?id=65028 and looks like it happens because phar writes manifest after HALT_COMPILER(); ?> and first 4 bytes of manifest are manifest length (little-endian), but when it read the header, it checks if there's \r\n after ?>. So if length has lowest byte 0x0d or 0x0a, bad things happen. I've created https://github.com/php/php-src/pull/392 to fix this problem, however I'd like somebody with more familiarity with phar details to take a look if it's the best way to do it. P.S.: BTW, who is official phar maintainer now? I'm seeing that last commit from anybody listed as maintainer is 4 years ago... Is it time to update ownership? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227