[FFmpeg-cvslog] avformat/rmdec: Check codec_data_size
Michael Niedermayer
git at videolan.org
Thu Mar 12 18:05:29 CET 2015
ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 3 20:01:18 2014 +0100| [a5c43d7c87b5a2da5696f4ef5f7c0194a5e26aa8] | committer: Michael Niedermayer
avformat/rmdec: Check codec_data_size
Fixes infinite loop
Fixes Ticket4154
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit a6f730730b82645a9d31aad0968487cb77d6946c)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5c43d7c87b5a2da5696f4ef5f7c0194a5e26aa8
---
libavformat/rmdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index dfd229e..5fe8539 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -305,6 +305,9 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
int64_t codec_pos;
int ret;
+ if (codec_data_size < 0)
+ return AVERROR_INVALIDDATA;
+
avpriv_set_pts_info(st, 64, 1, 1000);
codec_pos = avio_tell(pb);
v = avio_rb32(pb);
More information about the ffmpeg-cvslog
mailing list