Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regex match cache out-of-bounds access
Previously the following read and wrote 1 byte out-of-bounds: $ valgrind ruby -e 'p /(\W+)[bx]\?/i.match? "aaaaaa aaaaaaaaa aaaa aaaaaaaa aaa aaaaxaaaaaaaaaaa aaaaa aaaaaaaaaaaa a ? aaa aaaa a ?"' 2> >(grep Invalid -A 30) Because of the `match_cache_point_index + 1` in memoize_extended_match_cache_point() and check_extended_match_cache_point(), we need one more byte of space.
- Loading branch information