Share

FastJar

Tracker: Patches

5 Patch for zipfile comment problem - ID: 1275036
Last Update: Settings changed ( toast )

This patch tries to address bug 200324. FastJar gives an error when listing
the contents of some jar files, even though it extracts them correctly. The
problem appears to occur in archives with a zipfile comment at the end. In
this case the central-header-end section is not 22 bytes from the end of
the file as the list_jar() function in jartool.c expects.

An alternative method of finding the central header is already used for
non-seekable files (e.g. when reading a jar file from stdin). So this patch
simply falls back on the method used for non-seekable files when reading
the central-header-end section does not work. It fixes the problem for me.

The non-seekable files case is also changed to exit with an error if the
file being read appears to have an invalid format.

The patch looks big only because I needed to re-indent a block of code.


Wil Mahan ( wmahan ) - 2005-08-28 08:36

5

Closed

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2005-08-28 20:28
Sender: wmahan

Logged In: YES
user_id=613983

I just noticed that there is a different patch for the
problem at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13020 .

Either approach should fix the problem. My patch might be a
little less efficient, but I think the other patch would
fail if the comment happens to contain the magic string
0x06054b50. I'm not sure if that ever happens in practice.


Log in to comment.

Attached File ( 1 )

Filename Description Download
200324.patch Patch for bug 200324 Download

Changes ( 3 )

Field Old Value Date By
status_id Open 2007-02-06 02:30 toast
close_date - 2007-02-06 02:30 toast
File Added 147248: 200324.patch 2005-08-28 08:36 wmahan