summaryrefslogtreecommitdiff
path: root/spec/ruby/core/data/shared
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2025-05-02 23:26:05 -0500
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-05-08 18:03:04 +0900
commit8685a81e6a0bdf7b766af930ee0e05a28e07d69b (patch)
tree27fb3cff7804bd93985517ebdd0c7113a1bfe661 /spec/ruby/core/data/shared
parent5a0306f9c1cd3c60d8b4735565a8cd794eb20ca6 (diff)
[ruby/strscan] jruby: Check if len++ walked off the end
(https://github.com/ruby/strscan/pull/153) Fix https://github.com/ruby/strscan/pull/152 CRuby can walk off the end because there's always a null byte. In JRuby, the byte array is often (usually?) the exact size of the string. So we need to check if len++ walked off the end. This code was ported from a version by @byroot in https://github.com/ruby/strscan/pull/127 but I missed adding this check due to a lack of tests. A test is included for both "-" and "+" parsing. https://github.com/ruby/strscan/commit/1abe4ca556
Diffstat (limited to 'spec/ruby/core/data/shared')
0 files changed, 0 insertions, 0 deletions