[FFmpeg-cvslog] avcodec/mpegvideo: Check for NULL in ff_mpv_common_end()

Michael Niedermayer git at videolan.org
Mon Jul 13 19:39:30 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Jul 13 19:18:08 2015 +0200| [cc0380222add8df8ff9b3bd95eaf2b9d8c4c0d11] | committer: Michael Niedermayer

avcodec/mpegvideo: Check for NULL in ff_mpv_common_end()

Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 1048576 alloc limit

Found-by: Samuel Groß, 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=cc0380222add8df8ff9b3bd95eaf2b9d8c4c0d11
---

 libavcodec/mpegvideo.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 637b569..870d790 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1107,6 +1107,9 @@ void ff_mpv_common_end(MpegEncContext *s)
 {
     int i;
 
+    if (!s)
+        return ;
+
     if (s->slice_context_count > 1) {
         for (i = 0; i < s->slice_context_count; i++) {
             free_duplicate_context(s->thread_context[i]);



More information about the ffmpeg-cvslog mailing list