View Issue Details

IDProjectCategoryView StatusLast Update
0000431fileGeneralpublic2023-03-05 19:45
ReporterBarteks2x Assigned Tochristos  
Status resolvedResolutionfixed 
Product Version5.44 
Fixed in Version5.45 
Summary0000431: ERROR: (null) when running with --mime-type on a specific byte sequence
DescriptionI found this issue while trying to use the source code of "file" to make a "data recovery" tool for my own use that scans a disk for file signatures, and ran into this error.

The shortest sequence of bytes (in hex) that reproduces this issue is:
0000 feff f9ff f6ff
Steps To Reproduceprintf "\x00\x00\xfe\xff\xf9\xff\xf6\xff" > test && file --mime-type test
Additional InformationAfter debugging it and reading the code this behavior seems intentional, but previous bug reports about similar output seem to contradict that observation.

It appears to fail in file_ascmagic, in file_ascmagic_with_encoding - it initially detects this as a UTF-32 file but then attempts to handle it as UTF-8. But overall outputting that error when this code fails to get any information about the text seems intentional.
TagsNo tags attached.



2023-03-05 19:45

manager   ~0003902

fixed, thanks!

Issue History

Date Modified Username Field Change
2023-03-04 20:50 Barteks2x New Issue
2023-03-05 19:45 christos Assigned To => christos
2023-03-05 19:45 christos Status new => assigned
2023-03-05 19:45 christos Status assigned => resolved
2023-03-05 19:45 christos Resolution open => fixed
2023-03-05 19:45 christos Fixed in Version => 5.45
2023-03-05 19:45 christos Note Added: 0003902