Commit c27c7b49 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/av1_parse: Check obu_size

Fixes: out of array read
Fixes: SIGSEGV_get_obu_bit_length_av1_parse
Found-by: 's avatarkeval shah <skeval65@gmail.com>
Reviewed-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent f099946f
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment