[FFmpeg-cvslog] avidec: Dont crash on avi packets that belong to dv streams in dv in avi

Michael Niedermayer git at videolan.org
Tue Apr 17 18:17:39 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr 17 17:42:09 2012 +0200| [096231d497457be9496b0be01ff6da2093186c3c] | committer: Michael Niedermayer

avidec: Dont crash on avi packets that belong to dv streams in dv in avi

Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/avidec.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index c033b62..0300316 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -958,6 +958,11 @@ start_sync:
             st = s->streams[n];
             ast = st->priv_data;
 
+            if (!ast) {
+                av_log(s, AV_LOG_WARNING, "Skiping foreign stream %d packet\n", n);
+                continue;
+            }
+
             if(s->nb_streams>=2){
                 AVStream *st1  = s->streams[1];
                 AVIStream *ast1= st1->priv_data;



More information about the ffmpeg-cvslog mailing list