[File] [PATCH] fix accidental 'any char' regexps

Dirk Müller dirk at dmllr.de
Wed Mar 23 09:13:55 UTC 2022


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.


More information about the File mailing list