[File] [PATCH] fix accidental 'any char' regexps
christos at zoulas.com
Thu Mar 24 15:49:10 UTC 2022
> On Mar 23, 2022, at 5:13 AM, Dirk Müller <dirk at dmllr.de> wrote:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 235 bytes
Desc: Message signed with OpenPGP
More information about the File