diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-14 20:55:25 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-14 20:55:57 +0400 |
commit | b2c2589ecf87e6d42d4134e726552a35b2820e09 (patch) | |
tree | fc843f32c5ea4b3a1dd505490aaf20def9e10300 /libavformat/westwood_vqa.c | |
parent | 3c5c6b9d61361eae3eb989ad8aeca80f0fc05a63 (diff) |
westwood_vqa: fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/westwood_vqa.c')
-rw-r--r-- | libavformat/westwood_vqa.c | 3 |
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 */ |