Commit 205c31b3 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hapdec: Check section_size for non negativity in parse_section_header()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0cdba4ac
......@@ -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;
......
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