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

The issue was reported by https://hackerone.com/ston3
This commit is contained in:
Yukihiro "Matz" Matsumoto
2016-12-30 22:09:32 +09:00
parent 803bf010ca
commit 270ea41b37
+3
View File
@@ -1143,6 +1143,9 @@ RETRY_TRY_BLOCK:
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);
}
}
}