mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avcodec/av1_parse: Check obu_size
Fixes: out of array read Fixes: SIGSEGV_get_obu_bit_length_av1_parse Found-by: keval shah <skeval65@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f099946faf
commit
c27c7b49dc
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue