[File] Regression from firstline initialization

Christoph Biedl astron.com.bwoj at manchmal.in-ulm.de
Sun Oct 2 21:04:10 UTC 2022


Hello,

there are a few regressions I've noticed lately.

For a starter, commit

    commit c81335fad6cd38c745f3ce6a2f877a05718dee63
    Author: Christos Zoulas <christos at zoulas.com>
    Date:   Thu Aug 18 07:57:53 2022 +0000

        PR/373: Initialize firstline properly so that multiple calls to match work.

When using against the file available at
https://bugs.launchpad.net/ubuntu/+source/file/+bug/1717991/+attachment/4952354/+files/test.jpg
(sha256 097ab7efa99c0189853270d702f3347b2ca23c5886dceb1e3217fb7ac0fd975b)
there is an additional "\012- " in the detection, as in

-test.jpg: JPEG image data, (...) Exif Standard: [TIFF image data, (...)
+test.jpg: JPEG image data, (...) Exif Standard: [\012- TIFF image data, (...)

This happens with some other samples as well. And no, I have no idea
what went wrong here.

    Christoph


More information about the File mailing list