GNU bug report logs - #77898
31.0.50; arc-mode: Split PKZIP archive signature not recognized

Previous Next

Package: emacs;

Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Date: Fri, 18 Apr 2025 12:33:03 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 77898 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: 77898 <at> debbugs.gnu.org
Subject: Re: bug#77898: 31.0.50;
 arc-mode: Split PKZIP archive signature not recognized
Date: Fri, 18 Apr 2025 15:51:13 +0300
> Date: Fri, 18 Apr 2025 14:30:59 +0200
> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> The attached zip file is a "real" one, in the sense that it has been
> created in the wild.  It is a stripped down "terraform stack" generated
> by one of the cloud providers.
> 
> InfoZIP's unzip can handle that file without problems:
> 
>   [emacs-master]$ unzip -v
>   UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.
>   [...]
> 
>   [emacs-master]$ unzip -l tf-stack.zip
>   Archive:  tf-stack.zip
>     Length      Date    Time    Name
>   ---------  ---------- -----   ----
>          38  2025-04-01 08:43   provider.tf
>   ---------                     -------
>          38                     1 file
> 
> However, "./src/emacs -Q tf-stack.zip" fails on it with:
> 
>   File mode specification error: (error "Buffer format not recognized")
> 
> It turns out that the zip file starts with a special marker 0x08074b50
> for spanned or split archives, as defined in the pseudo zip file
> specification "APPNOTE.txt" by PKWARE.  See section 8.5 "Capacities and
> Markers" of that document for more details.
> 
> The attached patch provides support for the aforementioned special
> marker, alongside with the already present "temporary spanning marker"
> 0x30304b50.  The patch itself is trivial, but I tried to provide above
> information also in the commit message for future reference.
> 
> WDYT?

Please add comments describing the possible signatures, with pointers
to specific sections of APPNOTE.txt.

Also, is it possible to add some tests for this?

Thanks.




This bug report was last modified 23 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.