summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--compile.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ccdf7797e..542b7a0fee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 5 22:22:51 2010 wanabe <s.wanabe@gmail.com>
+
+ * compile.c (iseq_set_sequence): fix check range of ic_index.
+ a patch from Tomoyuki Chikanaga. #3236
+
Wed May 5 21:49:31 2010 Yutaka Kanemoto <kanemoto@ruby-lang.org>
* dln.c (aix_loaderror): use execerror for load error on AIX.
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);
}