aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authorwanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-05 13:33:58 +0000
committerwanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-05 13:33:58 +0000
commit0356eef426342a3305924b6438bd29914d9cc57e (patch)
treef57d1809fe6eccb1f36c8efdaa26c6fffe09181a /compile.c
parent0882e74bf632b5003c8d02c54798f74f4c292d7e (diff)
downloadruby-0356eef426342a3305924b6438bd29914d9cc57e.tar.gz
* 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
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index f3e43fc3b7..61dc7e10dd 100644
--- a/compile.c
+++ b/compile.c
@@ -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);
}