[File] "lhs/off overflow" messages to stderr

Alexandre IOOSS erdnaxe at crans.org
Thu Dec 22 08:04:29 UTC 2022


Hello,

I also encountered these errors messages when running file on my documents.

I made a 6-bytes file that triggers the message:
```
$ hexdump -C test.bin
00000000  00 00 00 43 ff ff                                 |...C..|
00000006
$ file test.bin
lhs/off overflow 4294918912 0
test.bin: data
```

Running `file -d test.bin 2>&1` shows:
```
[...]
42: > 2(lelong,&0), string,=*IDENTIFICATION,"Becker & Hickl PMS Data File"]
lhs/off overflow 4294918912 0
bb=[0x7fd200cb1010,6,0], 0 [b=0x7fd200cb1010,6,0], [o=0, c=0]
[...]
```

So it seems that "Becker & Hickl PMS Data File" signature is causing at 
least partially this issue.

Best wishes,

-- 
Alexandre


On 12/20/22 23:34, Christoph Biedl wrote:
> Okay, that one was garbled, too.
> 
> So in a nutshell,
> 
> commit ba8be65cb978669c2081265ae61f7606805eeb3e
> Author: Christos Zoulas <christos at zoulas.com>
> Date:   Wed Sep 21 02:18:17 2022 +0000
> 
>      check and limit range of offset to prevent overflow (clusterfuzz)
> 
> introduced error messages in src/softmagic.c, printed to stderr. At
> least the first one
> 
> | fprintf(stderr, "lhs/off overflow %jd %jd\n", lhs, off);
> 
> gets triggered here on a regular base (lost a reproducer, can try to find it
> again).
> 
> May I suggest to disable them, or to print them only when running under
> some debugging?
> 
>      Christoph
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://mailman.astron.com/pipermail/file/attachments/20221222/863959da/attachment.asc>


More information about the File mailing list