Skip to content

Commit

Permalink
method_missing() may have CALL_MAXARGS-1 arguments; fix #3351
Browse files Browse the repository at this point in the history
The issue was reported by https://hackerone.com/ston3
  • Loading branch information
matz committed Dec 30, 2016
1 parent 803bf01 commit 270ea41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vm.c
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 270ea41

Please sign in to comment.