aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-17 17:42:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-06 00:50:25 +0200
commitbf2534a5e2d57498dc663b1f49f85521e5ab9235 (patch)
tree57ba9c0b743e67e90de44fa40e7b2c4cdd75a5ab /libavformat/avidec.c
parent1ca4e70b6c52601e376c672741a960761c0b2516 (diff)
downloadffmpeg-bf2534a5e2d57498dc663b1f49f85521e5ab9235.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> (cherry picked from commit 096231d497457be9496b0be01ff6da2093186c3c)
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index ec2204c0a9..72aa60731f 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -954,6 +954,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;