file incorrectly labeled as Erlang JAM file (OOo does not print on Tuesdays)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
file (Debian) |
Fix Released
|
Unknown
|
|||
file (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Hardy |
Fix Released
|
High
|
Colin Watson | ||
Intrepid |
Fix Released
|
High
|
Colin Watson | ||
Jaunty |
Fix Released
|
High
|
Colin Watson | ||
Karmic |
Fix Released
|
High
|
Unassigned |
Bug Description
Binary package hint: file
anon@x-X:~$ echo "1/2 Tue" >> file && file file
file: Jan 22 14:32:44 MET 1991\011Erlang JAM file - version 4.2
anon@x-X:~$ file --version
file-4.21
magic file from /etc/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 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://
http://
http://
TEST CASE: Download http://
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.
Changed in file (Ubuntu Hardy): | |
milestone: | none → ubuntu-8.04.3 |
Changed in file (Debian): | |
status: | Unknown → Fix Committed |
Changed in file (Debian): | |
status: | Fix Committed → Fix Released |
tags: |
added: verification-done removed: verification-needed |
summary: |
- file incorrectly labeled as Erlang JAM file + file incorrectly labeled as Erlang JAM file (OOo does not print on + Tuesdays) |
This also apparently can cause PostScript files to be misidentified as Erlang JAM files which in turn causes them not to be able to be printed as noted in bug 255161.