summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-20 04:51:09 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-20 04:51:09 +0000
commit0deee5c0aaf7a1b6a78bf4513fdd3a59475bfcf8 (patch)
treebc263c4743bd4b74204ea9b76edd6019c8635a8c /bootstraptest
parent0dfc5918ec19cb67d8a49915ad8ab177f56e4e73 (diff)
vm_insnhelper.c: recv -1 + 3 overflows
Here, recv can be INT2FIX(-1), which is 0xFFFF_FFFFul. INT2FIX(1) is 3ul. So `recv - 1 + INT2FIX(1)` is: recv 0xFFFF_FFFFul recv-1 0xFFFF_FFFEul (note: unsigned) recv-1+INT2FIX(1) 0x0000_0001ul Here is the overflow. Given recv is a Fixnum, it can never be 0xFFFF_FFFD. 0xFFFF_FFFF is the only value that can overflow this way, so special-casing this value should just suffice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
0 files changed, 0 insertions, 0 deletions