mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
westwood_vqa: fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3c5c6b9d61
commit
b2c2589ecf
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user