Permalink
Browse files

method_missing() may have CALL_MAXARGS-1 arguments; fix #3351

The issue was reported by https://hackerone.com/ston3
  • Loading branch information...
matz committed Dec 30, 2016
1 parent 803bf01 commit 270ea41b376d82b9685746ea363f64cbc84e79c9
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/vm.c
View
@@ -1143,6 +1143,9 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
else {
value_move(regs+a+2, regs+a+1, ++n);
regs[a+1] = sym;
if (n == CALL_MAXARGS) {
regs[a+1] = mrb_ary_new_from_values(mrb, n, regs+a+1);
}
}
}

0 comments on commit 270ea41

Please sign in to comment.