Comment 0 for bug 248619

Revision history for this message
jgallo (gallo-j) wrote : file incorrectly labeled as Erlang JAM file

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:/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.