aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-17 17:42:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-17 17:58:19 +0200
commit096231d497457be9496b0be01ff6da2093186c3c (patch)
tree0d24f309d5e88ec55dfd22e99fb45cba638b9518
parent9789b6ca48cde61c052d9ecbd4cdd42ce51c053e (diff)
downloadffmpeg-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.c5
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;