Skip Menu |
 

This queue is for tickets about the File-MMagic CPAN distribution.

Report information
The Basics
Id: 4554
Status: new
Priority: 0/
Queue: File-MMagic

People
Owner: Nobody in particular
Requestors: slaven [...] rezic.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.21
Fixed in: (no value)



Subject: Wrong match of GIF file
Download (untitled) / with headers
text/plain 739b
I have a GIF file for which File::MMagic reports it's "ext2 filesystem data": $ perl -MFile::MMagic -e 'warn File::MMagic->new("/usr/share/magic")->checktype_filename("000037E8_thmb.gif")' [some warnings] Linuxrev -1383510264.27931ext2 filesystem data(mounted or unclean)(errors)(compressed) at -e line 1. file(1) also gives the same wrong result. I suspect it's because of the ordering of magic numbers in the /usr/share/magic file: the ext2 magics are before the GIF magics. A possible solution would be to sort the magics by offset. The ext2 magic begins with 0x438 leshort 0xEF53 Linux and the offset of 0x438 should be treated less significant than the offset of 0 used in the GIF magic. Regards, Slaven


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.