Re: [PATCH v2] line-range: Fix infinite loop bug with degenerate regex
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> It's perfectly OK to provide a zero-width regex in general, e.g. try:
> Or for a non-git tool:
> ...
The same story goes for "^" or even ".*", I suspect.
Show 6 quoted lines
> I think the real bug here is that we are pointing our regexec() at the
> haystack of multiple lines as an optimization.
>
> Then in "determine extent of line matched" and "is it a funcname line"
> assuming that a positive match must be non-zero-width. But that's just
> because the optimization is leaky.