aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-03 20:01:18 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-12 18:03:49 +0100
commita5c43d7c87b5a2da5696f4ef5f7c0194a5e26aa8 (patch)
tree55696dd60d24b3335a4c4ac50c4764bed4c74dc2
parent0b5d644839c5aa5af1ff6bd857007c9ff9fbbc00 (diff)
downloadffmpeg-a5c43d7c87b5a2da5696f4ef5f7c0194a5e26aa8.tar.gz
avformat/rmdec: Check codec_data_size
Fixes infinite loop Fixes Ticket4154 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit a6f730730b82645a9d31aad0968487cb77d6946c) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/rmdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index dfd229e93e..5fe853974d 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);