ruby-changes:35210
From: normal <ko1@a...>
Date: Wed, 27 Aug 2014 08:00:50 +0900 (JST)
Subject: [ruby-changes:35210] normal:r47292 (trunk): compile.c (iseq_set_sequence): check for multiplication overflow
normal 2014-08-27 08:00:37 +0900 (Wed, 27 Aug 2014) New Revision: 47292 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47292 Log: compile.c (iseq_set_sequence): check for multiplication overflow Modified files: trunk/ChangeLog trunk/compile.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47291) +++ ChangeLog (revision 47292) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Aug 27 07:59:17 2014 Eric Wong <e@8...> + + * compile.c (iseq_set_sequence): check for multiplication overflow + Tue Aug 26 22:07:42 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> * test/ruby/test_complex.rb: cherry-picked working assertions from r47251. Index: compile.c =================================================================== --- compile.c (revision 47291) +++ compile.c (revision 47292) @@ -1649,7 +1649,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ https://github.com/ruby/ruby/blob/trunk/compile.c#L1649 iseq->iseq_size = pos; iseq->stack_max = stack_max; - line_info_table = ruby_xrealloc(line_info_table, k * sizeof(struct iseq_line_info_entry)); + line_info_table = REALLOC_N(line_info_table, struct iseq_line_info_entry, k); iseq->line_info_table = line_info_table; iseq->line_info_size = k; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/