mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
xmv: check channel number
Fixes FPE Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
08c37a10e9
commit
5934d57ba9
@ -183,6 +183,11 @@ static int xmv_read_header(AVFormatContext *s)
|
||||
packet->bits_per_sample = avio_rl16(pb);
|
||||
packet->flags = avio_rl16(pb);
|
||||
|
||||
if (!packet->channels) {
|
||||
av_log(s, AV_LOG_ERROR, "0 channels\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
packet->bit_rate = packet->bits_per_sample *
|
||||
packet->sample_rate *
|
||||
packet->channels;
|
||||
|
Loading…
Reference in New Issue
Block a user