diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-29 02:58:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-01 23:50:40 +0100 |
commit | 046cc06f5a23e93e49f72ee1bc6efedbd5ca3b95 (patch) | |
tree | e2f684bfc53c90249808f094412813acfdd30b67 /libavformat/idroqdec.c | |
parent | 970781f5f29d3f7c9b1238b7ac6d94d70048b2f0 (diff) | |
download | ffmpeg-046cc06f5a23e93e49f72ee1bc6efedbd5ca3b95.tar.gz |
avformat/idroqdec: Check chunk_size for being too large
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 744a0b5206634e5de04d5c31f08cc3640faf800d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/idroqdec.c')
-rw-r--r-- | libavformat/idroqdec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c index 76bb3924b1..d733953a04 100644 --- a/libavformat/idroqdec.c +++ b/libavformat/idroqdec.c @@ -157,6 +157,9 @@ static int roq_read_packet(AVFormatContext *s, chunk_size = AV_RL32(&preamble[2]) + RoQ_CHUNK_PREAMBLE_SIZE * 2 + codebook_size; + if (chunk_size > INT_MAX) + return AVERROR_INVALIDDATA; + /* rewind */ avio_seek(pb, codebook_offset, SEEK_SET); |