Subject: | Warnings with magic file from RedHat 8.0 |
If I use File::MMagic with /usr/share/magic on a RedHat 8.0 I get a lot of warnings:
Invalid type 'string/b' at line 1146
Invalid type 'string/b' at line 1285
Invalid type 'string/b' at line 1286
...
Bad Offset/Type at line 2269. '0x1FE leshort 0xAA55 x86 boot sector
It seems to be that the /b /B and /c modifier are not implemented in File::MMagic. The manpage says:
string
A string of bytes. The string type specification can be optionally followed by /[Bbc]*. The ``B'' flag compacts whitespace in the target, which must contain at least one whitespace character. If the magic has "n" consecutive blanks, the target needs at least "n" consecutive blanks to match. The ``b'' flag treats every blank in the target as an optional blank. Finally the ``c'' flag, specifies case insensitive matching: lowercase characters in the magic match both lower and upper case characters in the targer, whereas upper case characters in the magic, only much uppercase characters in the target.
Regards,
Slaven