|
|
@ -636,8 +636,7 @@ static const char *decode_wireval(upb_decstate *d, const char *ptr, |
|
|
|
uint64_t size; |
|
|
|
uint64_t size; |
|
|
|
if (_upb_getmode(field) == _UPB_MODE_ARRAY) ndx += 18; |
|
|
|
if (_upb_getmode(field) == _UPB_MODE_ARRAY) ndx += 18; |
|
|
|
ptr = decode_varint64(d, ptr, &size); |
|
|
|
ptr = decode_varint64(d, ptr, &size); |
|
|
|
if (size >= INT32_MAX || |
|
|
|
if (size >= INT32_MAX || ptr - d->end + (int32_t)size > d->limit) { |
|
|
|
ptr - d->end + (int32_t)size > d->limit) { |
|
|
|
|
|
|
|
decode_err(d); /* Length overflow. */ |
|
|
|
decode_err(d); /* Length overflow. */ |
|
|
|
} |
|
|
|
} |
|
|
|
*op = delim_ops[ndx]; |
|
|
|
*op = delim_ops[ndx]; |
|
|
|