mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02: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