diff options
-rw-r--r-- | libavcodec/av1_parse.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/av1_parse.h b/libavcodec/av1_parse.h index 276af33ba9..864308f81d 100644 --- a/libavcodec/av1_parse.h +++ b/libavcodec/av1_parse.h @@ -134,8 +134,8 @@ static inline int parse_obu_header(const uint8_t *buf, int buf_size, size = *obu_size + *start_pos; - if (size > INT_MAX) - return AVERROR(ERANGE); + if (size > buf_size) + return AVERROR_INVALIDDATA; return size; } |