mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* compile.c (iseq_set_sequence): fix check range of ic_index.
a patch from Tomoyuki Chikanaga. #3236 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0882e74bf6
commit
0356eef426
2 changed files with 6 additions and 1 deletions
|
@ -1434,7 +1434,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
|
|||
{
|
||||
int ic_index = FIX2INT(operands[j]);
|
||||
IC ic = &iseq->ic_entries[ic_index];
|
||||
if (UNLIKELY(ic_index > iseq->ic_size)) {
|
||||
if (UNLIKELY(ic_index >= iseq->ic_size)) {
|
||||
rb_bug("iseq_set_sequence: ic_index overflow: index: %d, size: %d",
|
||||
ic_index, iseq->ic_size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue