[FFmpeg-cvslog] avformat/mpegts: check sl.timestamp_len

Michael Niedermayer git at videolan.org
Tue Jan 21 16:57:47 CET 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 27 11:45:55 2013 +0100| [d35916f6ea4964410073797d9ef73c1410d12b81] | committer: Michael Niedermayer

avformat/mpegts: check sl.timestamp_len

Fixes: msan_uninit-mem_7ff4404547ba_4883_dmbts.ts
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit e630ca5111077fa8adc972fe8a3d7e2b3e8dc91f)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d35916f6ea4964410073797d9ef73c1410d12b81
---

 libavformat/mpegts.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index fe4ac35..4c0c14e 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1222,6 +1222,11 @@ static int parse_MP4SLDescrTag(MP4DescrParseContext *d, int64_t off, int len)
         descr->sl.timestamp_res      = avio_rb32(&d->pb);
                                        avio_rb32(&d->pb);
         descr->sl.timestamp_len      = avio_r8(&d->pb);
+        if (descr->sl.timestamp_len > 64) {
+            avpriv_request_sample(NULL, "timestamp_len > 64");
+            descr->sl.timestamp_len = 64;
+            return AVERROR_PATCHWELCOME;
+        }
         descr->sl.ocr_len            = avio_r8(&d->pb);
         descr->sl.au_len             = avio_r8(&d->pb);
         descr->sl.inst_bitrate_len   = avio_r8(&d->pb);



More information about the ffmpeg-cvslog mailing list