In Perl_fbm_compile(), use STRLEN instead of U32 to calculate BmPREVIOUS().
authorNicholas Clark <nick@ccl4.org>
Tue, 17 May 2011 11:28:36 +0000 (12:28 +0100)
committerNicholas Clark <nick@ccl4.org>
Sat, 11 Jun 2011 07:40:02 +0000 (09:40 +0200)
commitea725ce6fd46ebc3bd7040373b9c0721af8813f8
tree7bbd6d6b3f4eb5ff6b980645959f8ab7843d5de4
parentced454951435adad2176a9e62dc76e463b1a6406
In Perl_fbm_compile(), use STRLEN instead of U32 to calculate BmPREVIOUS().

This should fix a theoretical bug on strings longer than 2**32 bytes where the
byte referenced by BmRARE() is at an offset beyond 2**32. I'm not sure how to
test this, as I think to trigger it one would need to have one of

a: the second argument to index as a string literal, longer than 2**32 bytes
b: a fixed string in a regex, longer than 2**32 bytes
util.c