From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#43597: 28.0.50; arc-mode.el fails to display a ZIP file Date: Fri, 25 Sep 2020 00:20:18 +0200 Message-ID: <87r1qqvmu5.fsf@gmx.net> References: <874knnvt79.fsf@gmx.net> <87y2ky7wi4.fsf@igel.home> <87zh5evrgw.fsf@gmx.net> <87v9g2vntw.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29317"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43597@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 25 00:22:04 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLZcq-0007UY-8v for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Sep 2020 00:22:04 +0200 Original-Received: from localhost ([::1]:41294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLZcp-0004mA-2t for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Sep 2020 18:22:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLZbq-0004eZ-8F for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLZbp-0002Q0-TW for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:21:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kLZbp-0007Uk-PK for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Sep 2020 22:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43597 X-GNU-PR-Package: emacs Original-Received: via spool by 43597-submit@debbugs.gnu.org id=B43597.160098603328754 (code B ref 43597); Thu, 24 Sep 2020 22:21:01 +0000 Original-Received: (at 43597) by debbugs.gnu.org; 24 Sep 2020 22:20:33 +0000 Original-Received: from localhost ([127.0.0.1]:41973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLZbN-0007Ti-5N for submit@debbugs.gnu.org; Thu, 24 Sep 2020 18:20:33 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:49521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLZbL-0007TV-Fj for 43597@debbugs.gnu.org; Thu, 24 Sep 2020 18:20:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600986024; bh=1LtoNjlm78GGbt4SHa9oDzwHHkQeec+vp9Mo9DNYtvg=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=clzDWJTr4MqkRrf9YeMjSXSJBy49xh1rlg/FRUcTwasaw2jsUP8qfBECIydhLA0UE Zc7ZRTXacefBK4MZ7IwPPjOFxjf2YVh2BLqMbCLhFWhFs7hmHkLQ3XPwQ9UtaKiKXs LniMS6vpRZG0WgZZhIFEfmptt0guPzZr/oW3uZ98= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-jhalfs ([178.6.220.84]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MYeQr-1jzvsK3iip-00VePU; Fri, 25 Sep 2020 00:20:24 +0200 In-Reply-To: <87v9g2vntw.fsf@gmx.net> (Stephen Berman's message of "Thu, 24 Sep 2020 23:58:51 +0200") X-Provags-ID: V03:K1:UmFgVDOXFaznElRS6bA5dpVqITr6nXQUFbDgQnQAAuzefX4kDCY DqZA4hRZRIQrrRKJ2S8LWi74IcQiiqH7KifwyZamRaCCLTuSerWgMppv2rdCRKo/YIe0gaq CgiuJcuAakiKgDF2zm4nj+CG4ZallKrxTerC6XgE/I49lEUYRXN+3uEvDDP6L0mkVbhyOAT 7Fq1V+8qvYB2nxCcqRqdg== X-UI-Out-Filterresults: notjunk:1;V03:K0:bpSY2Q6Te38=:zMgtpxDUzYy8l71h8ebpQ3 8RhHb4cBTUJE1+QckYYZ4pVHw+dij6PRyZMCri7WQ9GwXc679RKAel8NKEAnyEJIZHD5LS7c8 YADCQ2M1uPuoGlW7V6VFpPYghBSF2ZlMU5N7nrTk+nEdT353U1n53X31X2G1o2nJXbmDfcqfx amUk0Qb2NgnBcAfHjlcMWWBmsd8XVj8CDFNqJ12QbVcVBFrCckaXfE19FWaP6F6rxb5HTTPIe 3Jrb24YUIaLvFUMq36UwKF/zpXC5L74cdvFYl01GnFOvAEQnPfyTjAkXH4zRIFxSWeffN+hq4 IOzl1VGFIfrZO8A4aep9ibecaJIX4EjmzkfgGBNb4e5yGuGUm6tdh7GF6Hz9rI0qrZ93PbU9E vWCJ69EEY8crdYbX4CdixvQOBisXrGQFzqiqyH8MJZoJpIhd/7cvePoIH9+ykGVGI9UU3XHO2 Z0HB2qyvvqhU4JNu7jPJL75wvrCRyZdTqmGthvqQbPNKerT+Lde91UWuw9FYeCwanm+7e2icQ d6Ek9sWzWmRBG8/B3KDnIRve3FWPstaFSoPlNqJyZMTXT8ciaVrui5N+1crfZ2dwTrB/iW16L XASxF/+nAEJsWUtEFl+23jdK0bw34wo7vmqQW9LMHZ36XKBRO0IErLpBGY2Q4y1Ux8Ighd7yE sIbEFffhfvlojrGEvlySfJJNAYfQAG+tiPuCcQ9ix1NE2ggioQHN7U6Tad7P+O36Y3fdbJAAx T0na/5ZOKTvfpPm24+2OXh4JvG8JWgCyaULx/5CoveFlEmuCqeIM38hIWtY1AL1tyn6dqbct X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188916 Archived-At: On Thu, 24 Sep 2020 23:58:51 +0200 Stephen Berman wrote: > On Thu, 24 Sep 2020 22:40:15 +0200 Stephen Berman wrote: > >> On Thu, 24 Sep 2020 22:25:23 +0200 Andreas Schwab wrote: >> >>> On Sep 24 2020, Stephen Berman wrote: >>> >>>> In case it helps, here is the final byte sequence in the file (I've >>>> replace the control characters and raw bytes by ASCII representations): >>>> >>>> PK^E^F\377\377\377\377%^@%^@\377\377\377\377\377\377\377\377^@^@ >>> >>> That means the archive is in ZIP64 format. See >>> . The real >>> values are contained in the zip64 end of central directory record, which >>> has "PK\6\6" as the signature. >> >> Thanks. But then it seems that arc-mode.el doesn't handle this format >> correctly: archive-zip-summarize has this code: >> >> (let ((p (archive-l-e (+ (point) 16) 4)) >> files) >> (when (= p -1) >> ;; If the offset of end-of-central-directory is -1, this is a >> ;; Zip64 extended ZIP file format, and we need to glean the info >> ;; from Zip64 records instead. >> >> But the first value returned by archive-l-e for this file is 255, not >> -1, and on each iteration the value increases, so the ZIP64 code in the >> body of the when-clause is never executed. > > I've confirmed that changing the when-clause condition to (= p > 4294967295) (that's octal 37777777777, hex ffffffff) makes the body get > executed and the contents of the problematic ZIP file are correctly > displayed in archive-mode. Is that the correct fix? No, it's not, at least not without additional changes. I looked at the display in archive-mode too quickly before; looking again, I see that each file in the archive is shown as having size 4294967295 and the total size shown is correspondingly wrong. Steve Berman