aboutsummaryrefslogtreecommitdiffstats
path: root/lib/csv.rb
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2023-11-15 16:09:59 -0500
committerJean Boussier <jean.boussier@gmail.com>2023-11-16 10:23:15 +0100
commit9786b909f96804df50ed2ff0be0ef8c6eead4132 (patch)
tree4e6c15a7fbfbf61daced5899539197cd435aebec /lib/csv.rb
parentc65bb5a0f8a083e9a3fd7cec542ef7e494edfc48 (diff)
downloadruby-9786b909f96804df50ed2ff0be0ef8c6eead4132.tar.gz
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.
Diffstat (limited to 'lib/csv.rb')
0 files changed, 0 insertions, 0 deletions