Skip to content
Snippets Groups Projects
Commit 205c31b3 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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


Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0cdba4ac
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment