On Tue, Dec 15, 2015 at 12:20 PM, Christian Boltz wrote:
> Hello,
>
> I hit an endless loop in grep 2.22. I can reproduce it with
>
> # grep -obUa -P '\x04\x08\x00profile\x00\x07' cache--usr.sbin.smbldap-useradd
> 16profile
> 27801profile
> 27801profile
> 27801profile
> 27801profile
> 27801profile
On 12/18/2015 12:52 PM, Jim Meyering wrote:
And here is the patch that will form the basis of a complete fix:
Thanks for looking into that; you beat me to it!
POSIX says grep has undefined behavior when given an encoding error, and
looping forever sure fills the bill :-).
On Fri, Dec 18, 2015 at 1:50 PM, Paul Eggert wrote:
> On 12/18/2015 12:52 PM, Jim Meyering wrote:
>>
>> And here is the patch that will form the basis of a complete fix:
>
> Thanks for looking into that; you beat me to it!
>
> POSIX says grep has undefined behavior when given an encoding error, an