[FFmpeg-cvslog] avformat/idroqdec: Check chunk_size for being too large
Michael Niedermayer
git at videolan.org
Sun Dec 4 22:13:01 EET 2016
ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Tue Nov 29 02:58:34 2016 +0100| [ff01dbb6ec88285d11fb87be109007f398cb0e56] | 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=ff01dbb6ec88285d11fb87be109007f398cb0e56
---
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