You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
4xm: check that bits per sample is strictly positive
Avoids a divide by zero. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
@@ -146,7 +146,7 @@ static int parse_strk(AVFormatContext *s,
|
|||||||
|
|
||||||
if (fourxm->tracks[track].channels <= 0 ||
|
if (fourxm->tracks[track].channels <= 0 ||
|
||||||
fourxm->tracks[track].sample_rate <= 0 ||
|
fourxm->tracks[track].sample_rate <= 0 ||
|
||||||
fourxm->tracks[track].bits < 0) {
|
fourxm->tracks[track].bits <= 0) {
|
||||||
av_log(s, AV_LOG_ERROR, "audio header invalid\n");
|
av_log(s, AV_LOG_ERROR, "audio header invalid\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user