Subject: bug#62630: 27.1; Emacs is unable to open some jar files

From: Eli Zaretskii <[email-masked]>
Date: Mon, 03 Apr 2023 05:27:11 +0300

> From: Steinar Bang <[email-masked]>
> Date: Mon, 03 Apr 2023 00:04:56 +0200
> 
> When opening some .jar files that I have created with maven-jar-plugin
> 3.2.0, instead of opening the directory listing of the .jar file, the
> following error message is written to the minibuffer:
> 
> Args out of range: #<buffer modelstore.services-1.0.0-SNAPSHOT-javadoc.jar>, 329454, 329458
> 
> and then the file is opened in a buffer showing the binary contents of
> the file

I cannot reproduce this, neither with Emacs 27.1 nor with what will be
soon Emacs 29.1.  I wonder why this happens on your system.

> The archive-zip-summarize function looks for the magic sequence
> "PK\005\006" or "PK\006\007" or "PK\006\006" or "PK\001\002".
> 
> But what the problem jar file starts with, is "PK^c^d", which I think is
> "PK\003\004", which is none of the above.
> 
> I.e. archive-zip-summarize doesn't recognize the magic number of these
> jar files.

As explained on help-gnu-emacs, your conclusions were incorrect.  In
any case, the problem is not reproducible here.