Subject: Re: [PATCH v3] line-range: Fix infinite loop bug with degenerate '$' regex

From: Junio C Hamano <[email-masked]>
Date: Sun, 18 Dec 2022 10:33:07 +0900

Lars Kellogg-Stedman <[email-masked]> writes:

>> > @@ -161,6 +160,7 @@ static const char *find_funcname_matching_regexp(xdemitconf_t *xecfg, const char
>> >  			return bol;
>> >  		start = eol;
>> >  	}
>> > +	return NULL;
>> >  }
>> 
>> What is this change about?  Isn't the above an endless loop without
>> break, from which the only way for the control to leave it is by
>> returning?
>
> It's not an endless loop without break; this change modified the loop
> condition:

Ah, thanks, that's clear, and sorry for the noise, and thanks.