Bug 637785 - file command can't identify the zip64 format correctly.
Summary: file command can't identify the zip64 format correctly.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-27 12:17 UTC by ritz
Modified: 2010-09-29 07:21 UTC (History)
1 user (show)

Fixed In Version:
Clone Of: 637782
Environment:
Last Closed: 2010-09-29 07:21:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch (476 bytes, patch)
2010-09-27 12:30 UTC, ritz
no flags Details | Diff

Description ritz 2010-09-27 12:17:57 UTC
+++ This bug was initially created as a clone of Bug #637782 +++

Description of problem:
file command can't identify the zip64[1] format correctly.

Version-Release number of selected component (if applicable):
zip-3.0-1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Create an archive as zip v3.0 format. 
$ echo foo | zip > test.zip 

2. Check a file type of the created archive by the file command. 
$ file test.zip 

Actual results:
The file command identifies a zip64 format archive as "data". 

Expected results:
The file command identifies a zip64 format archive as "ZIP64 archive data". 

Additional info:
magic bit from zip file 

50 4B 03 04  14 < -- correctly identified    --> PK...
50 4B 03 04  2D <-- incorrectly identified --> PK..-

From magic definition file
# ZIP archives (Greg Roelofs, c/o zip-bugs.edu)
0       string          PK\003\004
>30     ubelong         !0x6d696d65
...
>>4     byte            0x14            Zip archive data, at least v2.0 to extract
!:mime  application/zip
<-- add here
>>4     byte            0x2d            Zip64 archive data, at least v3.0 to extract
!:mime  application/zip


Adding 2d to the list here should fix this.  2D is used to identify "zip64" format. This issue can also be triggered


This needs to pushed upstream.


[1] http://en.wikipedia.org/wiki/ZIP_%28file_format%29

Comment 1 ritz 2010-09-27 12:30:16 UTC
Created attachment 449876 [details]
patch

add zip4 magic to db

Comment 2 Jan Kaluža 2010-09-29 07:21:32 UTC
Patch sent upstream and fixed in rawhide.


Note You need to log in before you can comment on or make changes to this bug.