diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-24 18:51:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-25 16:41:27 +0100 |
commit | 5cb57a16ede71d913384a0b3036a2c6df5da5e43 (patch) | |
tree | f5ebe7f0e0f0dad351587959f7404c300c0b553f /libavformat | |
parent | f9de136b17bc72ff02f39c6a53756d72bbc4bd15 (diff) | |
download | ffmpeg-5cb57a16ede71d913384a0b3036a2c6df5da5e43.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/dv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c index 062c56787f..86ed1e954e 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -384,7 +384,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. */ |