[FFmpeg-cvslog] avformat/asfenc: Flush packet before duration becomes unrepresentable

Michael Niedermayer git at videolan.org
Tue Jan 12 20:19:35 CET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Jan 12 18:26:34 2016 +0100| [d73f0c586e7ef064e2f2a7cb7c84075543e3f010] | committer: Michael Niedermayer

avformat/asfenc: Flush packet before duration becomes unrepresentable

Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 32b726b..90d5c26 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -862,6 +862,11 @@ static void put_frame(AVFormatContext *s, ASFStream *stream, AVStream *avst,
                 flush_packet(s);
                 continue;
             }
+            if (asf->packet_timestamp_start > INT64_MAX - UINT16_MAX ||
+                timestamp > asf->packet_timestamp_start + UINT16_MAX) {
+                flush_packet(s);
+                continue;
+            }
         }
         if (frag_len1 > 0) {
             if (payload_len > frag_len1)



More information about the ffmpeg-cvslog mailing list