aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-24 17:51:40 +0100
committerAlex Converse <alex.converse@gmail.com>2012-03-06 15:28:00 -0800
commitefd30c4d95c56680f011c36a7f75c5c7389e34f2 (patch)
treea938bb67a73396eec90504a96dbb2797052df7ce /libavformat
parentd7fddc97d40025876e1342109a49f07ba8fa6878 (diff)
downloadffmpeg-efd30c4d95c56680f011c36a7f75c5c7389e34f2.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)
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/dv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 4896b0a3fe..bde8ca340a 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -343,7 +343,8 @@ int avpriv_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);
/* We work with 720p frames split in half, thus even frames have
* channels 0,1 and odd 2,3. */