View Issue Details

IDProjectCategoryView StatusLast Update
0000305fileGeneralpublic2022-01-10 19:32
Reporterfelixsch Assigned Tochristos  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformlinuxOSubuntuOS Versionimpish
Product Version5.39 
Fixed in Version5.42 
Summary0000305: file utility fails on a simple binary file with ERROR: (null)
DescriptionThe file utility fails on the attached simple binary file with output

    tmp.bin: ERROR: (null)

It turns out that the first 4 bytes trigger this issue, in fact the error occurs if the binary file starts with
0x02020100 or 0x02020200

file-5.38 gives the expected result

    tmp.bin: data
Steps To ReproduceRun the command
    `file tmp.bin`
on the attached file
Additional InformationI encountered the problem on ubuntu impish with file utility version 5.39. The attached file is just the head of a large binary file.
After cloning the repository and doing a `git bisect` it turned out that the problematic commit is

commit 2ca292bcdf217bfddeeeaad1adc38c716ffab181 (HEAD, refs/bisect/bad)
Author: Christos Zoulas <christos@zoulas.com>
Date: Sun Mar 15 16:44:37 2020 +0000

    Improve on Windoes Precompiled INFO files (Joerg Jenderek)

PS: I used the github repo to reproduce and bisect, but with the commit message above it should be possible to find the corresponding commit in the original repo.

The issue is still present in the actual master (commit message)

    PR/304: zachs18: Allow whitespace in netpbm sizes.
TagsNo tags attached.

Activities

felixsch

2021-12-23 15:18

reporter  

tmp.bin (32 bytes)

christos

2022-01-10 15:04

manager   ~0003686

Thanks, but the problem seems to be fixed; I can't reproduce this file 5.41...

felixsch

2022-01-10 19:00

reporter   ~0003688

Oh sorry, I must be in idiot.
When playing around with starting signature of the file I tried different signatures to narrow the bug, and then I attached the wrong file.
In fact tmp.bin starts with 0x02020300, and this is working.
Please try the newly attached file tmp2.bin, which should start with 0x02020200, if you are patient enough.
I get the issue with file-5.41 in the latest ubuntu:jammy docker container.
tmp2.bin (32 bytes)

christos

2022-01-10 19:32

manager   ~0003689

Spurious mprint() return value.

Issue History

Date Modified Username Field Change
2021-12-23 15:18 felixsch New Issue
2021-12-23 15:18 felixsch File Added: tmp.bin
2022-01-10 15:03 christos Assigned To => christos
2022-01-10 15:03 christos Status new => assigned
2022-01-10 15:04 christos Status assigned => feedback
2022-01-10 15:04 christos Note Added: 0003686
2022-01-10 19:00 felixsch File Added: tmp2.bin
2022-01-10 19:00 felixsch Note Added: 0003688
2022-01-10 19:00 felixsch Status feedback => assigned
2022-01-10 19:32 christos Assigned To christos =>
2022-01-10 19:32 christos Assigned To => christos
2022-01-10 19:32 christos Status assigned => resolved
2022-01-10 19:32 christos Resolution open => fixed
2022-01-10 19:32 christos Fixed in Version => 5.42
2022-01-10 19:32 christos Note Added: 0003689