re_intuit_start()/S_reghop3(): don't go beyond end
authorDavid Mitchell <davem@iabyn.com>
Wed, 13 Dec 2017 15:53:51 +0000 (15:53 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Dec 2017 15:53:51 +0000 (15:53 +0000)
commit37e6bbd906410b2b8aa9d9acaa9496d3d5a88949
treee0be5475704614d012803aabe577eba74563137c
parentea569f0097183cb2c1b98852f31b47264605f0b7
re_intuit_start()/S_reghop3(): don't go beyond end

RT #132552

when hopping N characters along a string, if the 'end stop' lim wasn't
on a char boundary, the value returned by S_reghop3() could be up to
(but not including) one char's worth of bytes beyond lim.

This is fairly harmless, but gave valgrind/ASan palpitations.

So fixed by this commit.
regexec.c
t/re/re_tests