[FFmpeg-cvslog] westwood_vqa: fix null pointer dereference
Michael Niedermayer
git at videolan.org
Fri Dec 14 18:19:07 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 14 17:55:25 2012 +0100| [b2c2589ecf87e6d42d4134e726552a35b2820e09] | committer: Michael Niedermayer
westwood_vqa: fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b2c2589ecf87e6d42d4134e726552a35b2820e09
---
libavformat/westwood_vqa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c
index 708f3e5..c996dad 100644
--- a/libavformat/westwood_vqa.c
+++ b/libavformat/westwood_vqa.c
@@ -233,7 +233,8 @@ static int wsvqa_read_packet(AVFormatContext *s,
switch (chunk_type) {
case SND1_TAG:
/* unpacked size is stored in header */
- pkt->duration = AV_RL16(pkt->data) / wsvqa->channels;
+ if(pkt->data)
+ pkt->duration = AV_RL16(pkt->data) / wsvqa->channels;
break;
case SND2_TAG:
/* 2 samples/byte, 1 or 2 samples per frame depending on stereo */
More information about the ffmpeg-cvslog
mailing list