diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-03 20:01:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-21 04:40:35 +0100 |
commit | ed75a9a60ecb4c60343aac24cec59848f26dceae (patch) | |
tree | 5ada95bc56bd4bbfe7c3ed127f237f1f5feaaba8 | |
parent | 33d74e62c25a1d706ef13b9471cd139d0e0d6541 (diff) | |
download | ffmpeg-ed75a9a60ecb4c60343aac24cec59848f26dceae.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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 37d91ec12f..38f101fc53 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -308,6 +308,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); |