mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: operand size check
* compile.c (ibf_load_code): raise an exception on invalid operand size. should not use assert() to validate incoming data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
37102f6bdb
commit
f01836cb3f
1 changed files with 4 additions and 2 deletions
|
@ -7489,8 +7489,10 @@ ibf_load_code(const struct ibf_load *load, const rb_iseq_t *iseq, const struct r
|
|||
break;
|
||||
}
|
||||
}
|
||||
assert(insn_len(insn) == op_index+1);
|
||||
};
|
||||
if (insn_len(insn) != op_index+1) {
|
||||
rb_raise(rb_eRuntimeError, "operand size mismatch");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return code;
|
||||
|
|
Loading…
Reference in a new issue