[File] [PATCH] fix accidental 'any char' regexps
Christos Zoulas
christos at zoulas.com
Thu Mar 24 15:49:10 UTC 2022
Applied, thanks!
christos
> On Mar 23, 2022, at 5:13 AM, Dirk Müller <dirk at dmllr.de> wrote:
>
> Hi,
>
> ping on this one..
>
> Am So., 13. März 2022 um 21:37 Uhr schrieb Dirk Müller <dirk at dmllr.de>:
>>
>> In several occassions the regexps were using '\.' when '\\.'
>> was intended, as the libmagic parsing does one level of dequoting.
>>
>> This is important as it causes "any char" to match rather than ".", and
>> makes the regexps fall to backtracking where not needed. So avoiding
>> that makes things more performant and more correct.
>>
>> Also when we're returning version numbers, search for nonempty matches.
>> Add sanity check during compile step that prints a warning.
> --
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20220324/e52bd745/attachment.asc>
More information about the File
mailing list