[FFmpeg-cvslog] avformat/idroqdec: Check chunk_size for being too large
Michael Niedermayer
git at videolan.org
Fri Dec 2 01:47:06 EET 2016
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Tue Nov 29 02:58:34 2016 +0100| [046cc06f5a23e93e49f72ee1bc6efedbd5ca3b95] | committer: Michael Niedermayer
avformat/idroqdec: Check chunk_size for being too large
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 744a0b5206634e5de04d5c31f08cc3640faf800d)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=046cc06f5a23e93e49f72ee1bc6efedbd5ca3b95
---
libavformat/idroqdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index 76bb392..d733953 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);
More information about the ffmpeg-cvslog
mailing list