mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Jump address should fit in 16 bits range; fix #3426
This commit is contained in:
@@ -388,6 +388,9 @@ dispatch(codegen_scope *s, int pc)
|
||||
scope_error(s);
|
||||
break;
|
||||
}
|
||||
if (diff > MAXARG_sBx) {
|
||||
codegen_error(s, "too distant jump address");
|
||||
}
|
||||
s->iseq[pc] = MKOP_AsBx(c, GETARG_A(i), diff);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user