Commit 0ca4414d authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö

audemux: Add a sanity check for the number of channels

Fixes a division by 0.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent a229d6c2
......@@ -145,6 +145,11 @@ static int au_read_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
}
if (channels == 0 || channels > 64) {
av_log(s, AV_LOG_ERROR, "Invalid number of channels %d\n", channels);
return AVERROR_INVALIDDATA;
}
if (size >= 24) {
/* skip unused data */
avio_skip(pb, size - 24);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment