diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-17 17:42:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-17 17:58:19 +0200 |
commit | 096231d497457be9496b0be01ff6da2093186c3c (patch) | |
tree | 0d24f309d5e88ec55dfd22e99fb45cba638b9518 | |
parent | 9789b6ca48cde61c052d9ecbd4cdd42ce51c053e (diff) | |
download | ffmpeg-096231d497457be9496b0be01ff6da2093186c3c.tar.gz |
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@gmx.at>
-rw-r--r-- | libavformat/avidec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index c033b6276e..0300316d3c 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; |