diff options
author | Mike Dalessio <mike.dalessio@gmail.com> | 2023-08-29 22:40:29 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-08-30 18:27:50 +0000 |
commit | 46e47404a8734efd7f312e29e2fb705dd2f40291 (patch) | |
tree | 8298b0586e41c9a25fe70e6e9f93f653d2faaeca /test/yarp | |
parent | c83552a596a34808651efca29a4f480bb5c579c6 (diff) | |
download | ruby-46e47404a8734efd7f312e29e2fb705dd2f40291.tar.gz |
[ruby/yarp] fix: trailing decimal, binary, octal, and hex numbers at end of file
Previously this resulted in invalid memory access.
Found by the fuzzer.
https://github.com/ruby/yarp/commit/af5b85a27a
Diffstat (limited to 'test/yarp')
-rw-r--r-- | test/yarp/fuzzer_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/yarp/fuzzer_test.rb b/test/yarp/fuzzer_test.rb index 97f128f08b..6f8cde0d09 100644 --- a/test/yarp/fuzzer_test.rb +++ b/test/yarp/fuzzer_test.rb @@ -17,4 +17,8 @@ class FuzzerTest < Test::Unit::TestCase snippet "incomplete escaped string", '"\\' snippet "trailing comment", "1\n#\n" snippet "trailing asterisk", "a *" + snippet "incomplete decimal number", "0d" + snippet "incomplete binary number", "0b" + snippet "incomplete octal number", "0o" + snippet "incomplete hex number", "0x" end |