ruby-changes:30627
From: nobu <ko1@a...>
Date: Tue, 27 Aug 2013 16:56:29 +0900 (JST)
Subject: [ruby-changes:30627] nobu:r42706 (trunk): enumerator.c: add comment
nobu 2013-08-27 16:56:17 +0900 (Tue, 27 Aug 2013) New Revision: 42706 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42706 Log: enumerator.c: add comment Modified files: trunk/ChangeLog trunk/enumerator.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42705) +++ ChangeLog (revision 42706) @@ -1,6 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 Tue Aug 27 16:51:21 2013 Nobuyoshi Nakada <nobu@r...> - * enumerator.c (enumerator_each): ensure argument array size is int. + * enumerator.c (enumerator_each): ensure that argument array size + does not overflow at appending. Tue Aug 27 16:46:05 2013 Nobuyoshi Nakada <nobu@r...> Index: enumerator.c =================================================================== --- enumerator.c (revision 42705) +++ enumerator.c (revision 42706) @@ -448,6 +448,7 @@ enumerator_each(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/enumerator.c#L448 VALUE args = e->args; if (args) { #if SIZEOF_INT < SIZEOF_LONG + /* check int range overflow */ rb_long2int(RARRAY_LEN(args) + argc); #endif args = rb_ary_dup(args); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/