aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-14 17:55:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-14 17:55:57 +0100
commitb2c2589ecf87e6d42d4134e726552a35b2820e09 (patch)
treefc843f32c5ea4b3a1dd505490aaf20def9e10300
parent3c5c6b9d61361eae3eb989ad8aeca80f0fc05a63 (diff)
downloadffmpeg-b2c2589ecf87e6d42d4134e726552a35b2820e09.tar.gz
westwood_vqa: fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/westwood_vqa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c
index 708f3e5fc3..c996dad8a2 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 */