Permalink
Browse files

`method_missing` might have updated stack beyond boundary; fix #3599

  • Loading branch information...
matz committed Apr 12, 2017
1 parent 326e043 commit 2a4db1a4beddf5657a458faeaac2bb970a374eed
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/vm.c
View
@@ -395,6 +395,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc
mrb_method_missing(mrb, mid, self, args);
}
mrb_ary_unshift(mrb, args, mrb_symbol_value(mid));
stack_extend(mrb, n+2);
mrb->c->stack[n+1] = args;
argc = -1;
}

0 comments on commit 2a4db1a

Please sign in to comment.