mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
pmpdec: check that there is at least one audio packet.
The code cannot handle there being none, but that should not happen for valid files. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
This commit is contained in:
parent
94a417acc0
commit
1b5d065ca7
@ -124,6 +124,11 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
if (pmp->cur_stream == 0) {
|
||||
int num_packets;
|
||||
pmp->audio_packets = avio_r8(pb);
|
||||
if (!pmp->audio_packets) {
|
||||
av_log(s, AV_LOG_ERROR, "No audio packets.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
num_packets = (pmp->num_streams - 1) * pmp->audio_packets + 1;
|
||||
avio_skip(pb, 8);
|
||||
pmp->current_packet = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user