[Bug 500511] New: file magic fails to recognize some zip-2.0 files
http://bugzilla.novell.com/show_bug.cgi?id=500511 Summary: file magic fails to recognize some zip-2.0 files Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jw@novell.com QAContact: qa@suse.de Found By: --- $ zip mimetest.zip mimetest.png using the attached png file, results in a zip file which is $ file mimetest.zip mimetest.zip: data This is due to an unfortunate subtest in /usr/share/misc/magic (after the PK magic:)
4 byte 0x14
30 ubelong !0x6d696d65 Zip archive data, at least v2.0 to extract !:mime application/zip
which means, that any compressed filename starting with 'mime' is not recognized. This test is probably intended to capture zip files, which need special handling ontop of unzipping, and want to provide an own mimetype for this. Example: http://www.gutenberg.org/cache/epub/4763/pg4763.epub I suggest to patch the above code to read
4 byte 0x14
30 ubelong !0x6d696d65 Zip archive data, at least v2.0 to extract !:mime application/zip 30 ubelong 0x6d696d65 Zip archive data, at least v2.0 to extract !:mime application/zip+extra-mime
-- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=500511
User jw@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c1
--- Comment #1 from Juergen Weigert
http://bugzilla.novell.com/show_bug.cgi?id=500511
User jw@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c2
--- Comment #2 from Juergen Weigert
http://bugzilla.novell.com/show_bug.cgi?id=500511
Zheng Chen
http://bugzilla.novell.com/show_bug.cgi?id=500511
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c3
Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=500511
User jw@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c4
--- Comment #4 from Juergen Weigert
http://bugzilla.novell.com/show_bug.cgi?id=500511
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c5
Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=500511
User adrian@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c6
Adrian Schröter
http://bugzilla.novell.com/show_bug.cgi?id=500511
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c7
--- Comment #7 from Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=500511
User jw@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c9
--- Comment #9 from Juergen Weigert
http://bugzilla.novell.com/show_bug.cgi?id=500511
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c10
Dr. Werner Fink
4 byte 0x14
30 ubelong !0x6d696d65 Zip archive data, at least v2.0 to !:mime application/zip +>>30 ubelong 0x6d696d65 Zip archive data, at least v2.0 to +>>>34 ubelong 0x74797065 \b, mime type +>>>>38 regex application/[a-z\+\-]+ \b %s +!:mime application/unknown+zip
# OpenOffice.org / KOffice / StarOffice documents # Listed here because they ARE zip files file-5.02-zip2.0.dif lines 1-13/13 (END) -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=500511
User jw@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c11
--- Comment #11 from Juergen Weigert
http://bugzilla.novell.com/show_bug.cgi?id=500511
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c12
--- Comment #12 from Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=500511
User jw@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c13
--- Comment #13 from Juergen Weigert
http://bugzilla.novell.com/show_bug.cgi?id=500511
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=500511#c14
--- Comment #14 from Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com