Unverified Commit b956c0f4 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4012 from take-cheeze/fix_heap_use_after_free

Fix heap use after free on mruby-aws-sigv4.
parents 1b261382 b8869498
......@@ -527,6 +527,8 @@ mrb_exec_irep(mrb_state *mrb, mrb_value self, struct RProc *p)
return MRB_PROC_CFUNC(p)(mrb, self);
}
ci->nregs = p->body.irep->nregs;
ci->env = MRB_PROC_ENV(p);
if (ci->env) ci->env->stack[0] = self;
if (ci->argc < 0) keep = 3;
else keep = ci->argc + 2;
if (ci->nregs < keep) {
......
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