[FFmpeg-cvslog] avformat/mux: Check that deinit is set before calling it

Michael Niedermayer git at videolan.org
Sun Apr 24 12:19:18 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 24 12:07:37 2016 +0200| [c84ba07db4abd123b2ad93784e312a24d9341553] | committer: Michael Niedermayer

avformat/mux: Check that deinit is set before calling it

Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/mux.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 6239fd1..91388e3 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -424,7 +424,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
     }
 
     if (s->oformat->init && (ret = s->oformat->init(s)) < 0) {
-        s->oformat->deinit(s);
+        if (s->oformat->deinit)
+            s->oformat->deinit(s);
         goto fail;
     }
 



More information about the ffmpeg-cvslog mailing list