diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | compile.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Wed Aug 27 07:59:17 2014 Eric Wong <e@80x24.org> + + * compile.c (iseq_set_sequence): check for multiplication overflow + Tue Aug 26 22:07:42 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> * test/ruby/test_complex.rb: cherry-picked working assertions from r47251. @@ -1649,7 +1649,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor) 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; |