Browse Source

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>
tags/n2.1
Martin Storsjö 11 years ago
parent
commit
a9221e3960
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/electronicarts.c

+ 1
- 1
libavformat/electronicarts.c View File

@@ -467,7 +467,7 @@ static int ea_read_header(AVFormatContext *s)
}

if (ea->audio_codec) {
if (ea->num_channels <= 0) {
if (ea->num_channels <= 0 || ea->num_channels > 2) {
av_log(s, AV_LOG_WARNING,
"Unsupported number of channels: %d\n", ea->num_channels);
ea->audio_codec = 0;


Loading…
Cancel
Save