]> granicus.if.org Git - file/commitdiff
Try to make the magic more selective to avoid spurious matches. (Joerg Jenderek)
authorChristos Zoulas <christos@zoulas.com>
Mon, 16 Sep 2013 15:12:42 +0000 (15:12 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 16 Sep 2013 15:12:42 +0000 (15:12 +0000)
magic/Magdir/ibm6000
magic/Magdir/sysex

index df2749148884ceb5eabd8319ca0930dadfec9c8c..7f45072a187a4066b871ca4d89a345ad1175b660 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: ibm6000,v 1.11 2013/01/08 20:13:01 christos Exp $
+# $File: ibm6000,v 1.12 2013/09/16 15:12:42 christos Exp $
 # ibm6000:  file(1) magic for RS/6000 and the RT PC.
 #
 0      beshort         0x01df          executable (RISC System/6000 V3.1) or obj module
 
 0      beshort         0x01f7          64-bit XCOFF executable or object module
 >20    belong          0               not stripped
-4      belong          &0x0feeddb0     AIX core file
->1     byte            &0x01           fulldump
->7     byte            &0x01           32-bit
->>0x6e0 string         >\0             \b, %s
->7     byte            &0x02           64-bit
->>0x524 string         >\0             \b, %s
+# GRR: this test is still too general as it catches also many FATs of DOS filesystems
+4      belong          &0x0feeddb0     
+# real core dump could not be 32-bit and 64-bit together
+>7     byte&0x03       !3              AIX core file
+>>1    byte            &0x01           fulldump
+>>7    byte            &0x01           32-bit
+>>>0x6e0       string  >\0             \b, %s
+>>7    byte            &0x02           64-bit
+>>>0x524       string  >\0             \b, %s
index 70b5b1cf24a1eb75b83c5080f9338657ecbe7346..c6f78cde2837907fc2fa461461a51bb4f38a7183 100644 (file)
@@ -1,10 +1,12 @@
 
 #------------------------------------------------------------------------
-# $File: sysex,v 1.6 2009/09/19 16:28:12 christos Exp $
+# $File: sysex,v 1.7 2013/09/16 15:12:42 christos Exp $
 # sysex: file(1) magic for MIDI sysex files
 #
-# 
-0      byte                    0xF0            SysEx File -
+# GRR: orginal 1 byte test at offset was too general as it catches also many FATs of DOS filesystems
+# where real SYStem EXclusive messages at offset 1 are limited to seven bits
+# http://en.wikipedia.org/wiki/MIDI
+0      ubeshort&0xFF80         0xF000          SysEx File -
 
 # North American Group
 >1     byte                    0x01            Sequential
 >1     byte                    0x52            Zoom
 >1     byte                    0x54            Matsushita
 >1     byte                    0x57            Acoustic tech. lab.
-
+# http://www.midi.org/techspecs/manid.php
 >1     belong&0xffffff00       0x00007400      Ta Horng
 >1     belong&0xffffff00       0x00007500      e-Tek
 >1     belong&0xffffff00       0x00007600      E-Voice