View Issue Details

IDProjectCategoryView StatusLast Update
0000613fileGeneralpublic2025-01-10 12:44
Reportervmihalko Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version5.46 
Summary0000613: [regression] file is not working with a single-line custom magic file
DescriptionAfter the following commit: https://github.com/file/file/commit/2038ad4664d721cbc37ec8ea1f5dfddfef157d2e
file no longer accepts a single-line custom magic file.

The question is whether this is the desired behavior.
Steps To ReproduceCreate a single-line custom magic file:
# echo '0 string MYFILEFORMAT My file format' > /var/tmp/magic

Compile the magic file:
# file -C -m /var/tmp/magic

Create a test file and run the file command:
# echo 'MYFILEFORMAT' > /var/tmp/testfile
# ./src/file -m magic.mgc /var/tmp/testfile

Output:
magic.mgc, 1: Warning: offset `�' invalid
file: Too few magic entries 2 in `magic.mgc'
Additional InformationEverything works as expected if a custom magic file contains at least two entries.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-01-10 12:44 vmihalko New Issue