aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/dv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-24 17:51:40 +0100
committerReinhard Tartler <siretart@tauware.de>2012-04-21 15:41:30 +0200
commitc4e8c99507b0b4ad384bea061afb6025ca868174 (patch)
treecff7a5eb6327407710a35fb745ee161519fe3241 /libavformat/dv.c
parent479869c499a28a0c19dfc355d6ffcd1d8c02720e (diff)
downloadffmpeg-c4e8c99507b0b4ad384bea061afb6025ca868174.tar.gz
dv: Fix null pointer dereference due to ach=0
dv: Fix null pointer dereference due to ach=0 Fixes part2 of CVE-2011-3929 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Reviewed-by: Roman Shaposhnik <roman@shaposhnik.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Alex Converse <alex.converse@gmail.com> (cherry picked from commit 5a396bb3a66a61a68b80f2369d0249729bf85e04) Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commit 44e182d41e3a73548f3f5e8445ec428d3846e6d6) Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commit b46141b0d1d7efb74dad172b7c1b52413441592f) Conflicts: libavformat/dv.c
Diffstat (limited to 'libavformat/dv.c')
-rw-r--r--libavformat/dv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index c650b5b52e..54ed81854f 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -341,7 +341,8 @@ int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
c->audio_pkt[i].pts = c->abytes * 30000*8 / c->ast[i]->codec->bit_rate;
ppcm[i] = c->audio_buf[i];
}
- dv_extract_audio(buf, ppcm, c->sys);
+ if (c->ach)
+ dv_extract_audio(buf, ppcm, c->sys);
c->abytes += size;
/* We work with 720p frames split in half, thus even frames have