diff options
| author | Charles Oliver Nutter <headius@headius.com> | 2025-05-02 23:26:05 -0500 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-05-08 18:03:04 +0900 |
| commit | 8685a81e6a0bdf7b766af930ee0e05a28e07d69b (patch) | |
| tree | 27fb3cff7804bd93985517ebdd0c7113a1bfe661 /spec/ruby/core/encoding/default_external_spec.rb | |
| parent | 5a0306f9c1cd3c60d8b4735565a8cd794eb20ca6 (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/encoding/default_external_spec.rb')
0 files changed, 0 insertions, 0 deletions
