Jump address should fit in 16 bits range; fix #3426

parent a746ebe9
...@@ -388,6 +388,9 @@ dispatch(codegen_scope *s, int pc) ...@@ -388,6 +388,9 @@ dispatch(codegen_scope *s, int pc)
scope_error(s); scope_error(s);
break; break;
} }
if (diff > MAXARG_sBx) {
codegen_error(s, "too distant jump address");
}
s->iseq[pc] = MKOP_AsBx(c, GETARG_A(i), diff); s->iseq[pc] = MKOP_AsBx(c, GETARG_A(i), diff);
} }
......
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