This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Off-by-one in PL_fold_locale use.
Fix for Coverity perl5 CID 29033: Out-of-bounds read
(OVERRUN) overrun-local: Overrunning array PL_fold_locale of 256 bytes at
byte offset 256 using index c1 (which evaluates to 256).
- the "c1 > 256" was off-by-one, it needed to be "c1 > 255",
it could have caused the PL_fold_locale to be accessed one past the end,
at offset 256, but we have dodged the bullet thanks to the regex engine
optimizing the bad case away before we hit it (analysis by Karl Williamson):
regexec.c
- comment fixes (pointed out by Karl Williamson): regexec.c
- add tests to nail down the behaviour of fold matching
for the last of Latin-1 (0xFF, lowercase which curiously does not have
uppercase within Latin-1). and the first pure Unicode: t/re/pat.t