Commit 73d7a721 authored by Gilad Zohari's avatar Gilad Zohari

Adjust ci->nregs to prevent heap corruption

parent 6bd49a3d
......@@ -346,7 +346,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mr
ci->nregs = argc + 2;
}
else {
ci->nregs = p->body.irep->nregs + 2;
ci->nregs = p->body.irep->nregs + n;
}
ci->acc = -1;
mrb->stack = mrb->stack + n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment