[前][次][番号順一覧][スレッド一覧]

ruby-changes:15710

From: wanabe <ko1@a...>
Date: Wed, 5 May 2010 22:34:13 +0900 (JST)
Subject: [ruby-changes:15710] Ruby:r27632 (trunk): * compile.c (iseq_set_sequence): fix check range of ic_index.

wanabe	2010-05-05 22:33:58 +0900 (Wed, 05 May 2010)

  New Revision: 27632

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27632

  Log:
    * compile.c (iseq_set_sequence): fix check range of ic_index.
      a patch from Tomoyuki Chikanaga.  #3236

  Modified files:
    trunk/ChangeLog
    trunk/compile.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27631)
+++ ChangeLog	(revision 27632)
@@ -1,3 +1,8 @@
+Wed May  5 22:22:51 2010  wanabe  <s.wanabe@g...>
+
+	* 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@r...>
 
 	* dln.c (aix_loaderror): use execerror for load error on AIX.
Index: compile.c
===================================================================
--- compile.c	(revision 27631)
+++ compile.c	(revision 27632)
@@ -1434,7 +1434,7 @@
 			{
 			    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);
 			    }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]