View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000655 | file | General | public | 2025-05-09 12:16 | 2025-05-09 15:17 |
Reporter | jsummers | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
OS | Ubuntu Linux | ||||
Product Version | 5.46 | ||||
Summary | 0000655: Type "string/bt" doesn't work as expected | ||||
Description | Suppose a pattern's first line has type "string/bt" (or "string/b/t"). I would expect the pattern to be able to match both binary and text files, as is the case for "search/bt", "regex/bt", and for just plain "string". But that doesn't happen. Only text files can match, as if it were "string/t". There are only two affected patterns in the current database, both near the beginning of magic/Magdir/sgml. | ||||
Steps To Reproduce | $ echo '<svgABCDEFG' > text_svg.dat $ echo -ne '<svg\0\0\xff\xff\x01\x02' > binary_svg.dat $ file text_svg.dat binary_svg.dat My results: text_svg.dat: SVG Scalable Vector Graphics image, ASCII text binary_svg.dat: data Expected results: text_svg.dat: SVG Scalable Vector Graphics image binary_svg.dat: SVG Scalable Vector Graphics image | ||||
Tags | No tags attached. | ||||