mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix stack move segfaulting in OP_ARYCAT
Reported by https://hackerone.com/haquaman Testcase (couldn't get it to work as a test): def nil.b b *nil end nil.b
This commit is contained in:
@@ -2134,8 +2134,8 @@ RETRY_TRY_BLOCK:
|
||||
|
||||
CASE(OP_ARYCAT) {
|
||||
/* A B mrb_ary_concat(R(A),R(B)) */
|
||||
mrb_ary_concat(mrb, regs[GETARG_A(i)],
|
||||
mrb_ary_splat(mrb, regs[GETARG_B(i)]));
|
||||
mrb_value splat = mrb_ary_splat(mrb, regs[GETARG_B(i)]);
|
||||
mrb_ary_concat(mrb, regs[GETARG_A(i)], splat);
|
||||
ARENA_RESTORE(mrb, ai);
|
||||
NEXT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user