[FFmpeg-cvslog] avformat/idroqdec: Check chunk_size for being too large
Michael Niedermayer
git at videolan.org
Tue Nov 29 20:27:31 EET 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Nov 29 02:58:34 2016 +0100| [744a0b5206634e5de04d5c31f08cc3640faf800d] | committer: Michael Niedermayer
avformat/idroqdec: Check chunk_size for being too large
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=744a0b5206634e5de04d5c31f08cc3640faf800d
---
libavformat/idroqdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index b664279..83701b5 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