** Attachment added: "jaunty-proposed patch" http://launchpadlibrarian.net/27497372/jaunty.diff
** Description changed: Binary package hint: file a...@x-x:~$ echo "1/2 Tue" >> file && file file file: Jan 22 14:32:44 MET 1991\011Erlang JAM file - version 4.2 a...@x-x:~$ file --version file-4.21 magic file from /etc/magic:/usr/share/file/magic If you look at the magic file: 4 string Tue Jan 22 14:32:44 MET 1991 Erlang JAM file - version 4.2 So at the fourth byte of the file, it's looking for Tue Jan 22 14:32:44 MET 1991 Since the spaces aren't escaped, it sees that the file contains "Tue" at the fourth byte and determines it to be an Erlang JAM file. I've tried it with file-4.21, file-4.23, file-4.24. In 4.21 and 4.24, the bug exists, but 4.23 correctly determines the file to be ASCII text. This was on Ubuntu 8.04.1. - This bug was fixed in Debian file 5.01-1 by escaping the spaces in the relevant magic entries. + This bug was introduced in file 4.20-4 (after dapper), and fixed in Debian file 5.01-1 by escaping the spaces in the relevant magic entries. Patches applicable to stable releases are here: + + http://launchpadlibrarian.net/27497360/hardy.diff + http://launchpadlibrarian.net/27497364/intrepid.diff + http://launchpadlibrarian.net/27497372/jaunty.diff TEST CASE: Download http://launchpadlibrarian.net/26055361/WillNotPrintOnTuesday.ps and run 'file' on it. Incorrect output looks like "WillNotPrintOnTuesday.ps: Jan 22 14:32:44 MET 1991\011Erlang JAM file - version 4.2"; correct output looks like "WillNotPrintOnTuesday.ps: PostScript document text conforming DSC level 3.0, Level 3". + + REGRESSION POTENTIAL: It's worth trying out printing in general, since + this is how this bug came to prominence, and if anyone actually has some + real Erlang JAM files to try out then that wouldn't hurt, as well as + perhaps running 'file' on some random things. Otherwise I don't + anticipate much in the way of regression potential here. -- file incorrectly labeled as Erlang JAM file https://bugs.launchpad.net/bugs/248619 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
