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

Merge pull request #4006 from take-cheeze/fix_ub_check

Fix undefined error of pointer dereference.
parents 2213deee 25c40c2f
...@@ -51,6 +51,7 @@ each_backtrace(mrb_state *mrb, ptrdiff_t ciidx, mrb_code *pc0, each_backtrace_fu ...@@ -51,6 +51,7 @@ each_backtrace(mrb_state *mrb, ptrdiff_t ciidx, mrb_code *pc0, each_backtrace_fu
pc = mrb->c->cibase[i].err; pc = mrb->c->cibase[i].err;
} }
else if (i+1 <= ciidx) { else if (i+1 <= ciidx) {
if (!mrb->c->cibase[i + 1].pc) continue;
pc = &mrb->c->cibase[i+1].pc[-1]; pc = &mrb->c->cibase[i+1].pc[-1];
} }
else { else {
......
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