** 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.
+ 
+ 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".

** Attachment added: "hardy-proposed patch"
   http://launchpadlibrarian.net/27497360/hardy.diff

-- 
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

Reply via email to