aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-26 07:24:55 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-26 07:24:55 +0000
commit87e4432e96b8df2b965144cca232122e6931e4d2 (patch)
tree0095450ba733eef0f87a79c1901334722bc41b6f /marshal.c
parent444e6dfbce0f4b827e80ea7926510d8db5a89b03 (diff)
downloadruby-87e4432e96b8df2b965144cca232122e6931e4d2.tar.gz
stringio.c: fix signed integer overflow
* ext/stringio/stringio.c (strio_seek): Avoid signed integer overflow. It's not harmful in practice here, but is still undefined behavior. * ext/stringio/stringio.c (strio_extend): Check that the new length does not exceed LONG_MAX. This fixes the invalid write on the overflow. * test/stringio/test_stringio.rb (test_write_integer_overflow): Add a test case for the above fix in strio_extend(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
0 files changed, 0 insertions, 0 deletions