mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 09:52:17 +00:00
avcodec/hapdec: Check section_size for non negativity in parse_section_header()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0cdba4ac68
commit
205c31b301
@ -61,7 +61,7 @@ static int parse_section_header(GetByteContext *gbc, int *section_size,
|
||||
*section_size = bytestream2_get_le32(gbc);
|
||||
}
|
||||
|
||||
if (*section_size > bytestream2_get_bytes_left(gbc))
|
||||
if (*section_size > bytestream2_get_bytes_left(gbc) || *section_size < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
else
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user