add error check code.
@@ -214,6 +214,10 @@ static mrbc_irep * load_irep_1(struct VM *vm, const uint8_t *bin, int *len, int
p = p_irep->pool + 2;
for( i = 0; i < irep.plen; i++ ) {
int siz;
+ if( (p - irep.pool) > UINT16_MAX ) {
+ mrbc_raise(vm, MRBC_CLASS(Exception), "Overflow IREP data offset table.");
+ return NULL;
+ }
*ofs_pools++ = (uint16_t)(p - irep.pool);
switch( *p++ ) {
case IREP_TT_STR:
