diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-05 00:09:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-05 00:37:53 +0200 |
commit | 205c31b301864e675d051b07b19b6c457cf2ab24 (patch) | |
tree | fbd333e223b9dbbf12ab1ecfbf9790c20e601963 /libavcodec/hapdec.c | |
parent | 0cdba4ac6806fc8a35e53e044967a3855a60d769 (diff) | |
download | ffmpeg-205c31b301864e675d051b07b19b6c457cf2ab24.tar.gz |
avcodec/hapdec: Check section_size for non negativity in parse_section_header()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hapdec.c')
-rw-r--r-- | libavcodec/hapdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index 3f036fd690..6adac21bbb 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -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; |