1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-04-24 17:12:34 +02:00

electronicarts: Add more sanity checking for the number of channels

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2013-09-28 23:38:40 +03:00
parent d07aa3f02b
commit a9221e3960

View File

@ -467,7 +467,7 @@ static int ea_read_header(AVFormatContext *s)
} }
if (ea->audio_codec) { if (ea->audio_codec) {
if (ea->num_channels <= 0) { if (ea->num_channels <= 0 || ea->num_channels > 2) {
av_log(s, AV_LOG_WARNING, av_log(s, AV_LOG_WARNING,
"Unsupported number of channels: %d\n", ea->num_channels); "Unsupported number of channels: %d\n", ea->num_channels);
ea->audio_codec = 0; ea->audio_codec = 0;