ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35000] New: - <unzip> does not fail on archives with broken directory index
Date Sat, 21 May 2005 10:19:15 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35000>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35000

           Summary: <unzip> does not fail on archives with broken directory
                    index
           Product: Ant
           Version: 1.6.1
          Platform: Macintosh
        OS/Version: Mac OS X 10.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: a7cdcq002@sneakemail.com


I've created a ZIP archive to reproduce Sun bug 4615343 (ZipFile.entries()
throws java.lang.InternalError). InfoZip's unzip 5.50 also agrees that the
archive is broken:

---------
$ unzip -l broken-index.zip 
Archive:  broken-index.zip
error [broken-index.zip]:  NULL central directory offset
  (attempting to process anyway)
  Length     Date   Time    Name
 --------    ----   ----    ----
     4096  01-01-80 00:00   1.txt
     4096  01-01-80 00:00   2.txt
 --------                   -------
     8192                   2 files
---------

However, if I try to unzip it using the following build.xml, ant neither detects
an error nor does it extract anything:

---------
<?xml version="1.0"?>
<project name="unzip-broken-index" default="build" basedir=".">
    <target name="build">
        <unzip src="broken-index.zip" dest="."/>
    </target>
</project>
---------

Here's the console output:

---------
$ ant build
Buildfile: build.xml

build:
    [unzip] Expanding: .../broken-index.zip into ...

BUILD SUCCESSFUL
Total time: 0 seconds
---------

My expectation would have been that <unzip> fails with an error message like
"ZIP file directory index must be fixed" or something similar.

I didn't see any way to attach the test archive to this bug. It is really small,
so I'll just insert a uuencoded copy of it:

begin 644 broken-index.zip
M4$L#!!0`"``(````(0`````````````````%````,2YT>'3MP4$.0!$,0$%K
MI^C5I/RDBZKP+=S>/>3-U.U^I+:ET\9OT24^*:+AICD!`````(`77%!+!PB'
MK#S<,@`````0``!02P,$%``(``@````A``````````````````4````R+G1X
M=.W!00Y`$0Q`06NGZ-6D_*2+JO`MW-X]Y,W4[7ZDMJ73QF_1)3XIHN&F.0$`
M````@!=<4$L'"(>L/-PR`````!```%!+`0(4`!0`"``(````(0"'K#S<,@``
M```0```%```````````````````````Q+G1X=%!+`0(4`!0`"``(````(0"'
MK#S<,@`````0```%`````````````````&4````R+G1X=%!+!08``````@`"
+`&8`````````````
`
end

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message