]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/electronicarts.c
Merge commit 'e5b019725f53b79159931d3a7317107cbbfd0860'
[ffmpeg] / libavformat / electronicarts.c
index 30eb723bd50000abbc152f0c498ad8ba0e17e6f2..bfd3fed3a2a537a1f8e585d65f83baa7d5938fed 100644 (file)
@@ -539,7 +539,7 @@ static int ea_read_header(AVFormatContext *s)
             ea->audio_codec = 0;
             return 1;
         }
-        if (ea->bytes <= 0) {
+        if (ea->bytes <= 0 || ea->bytes > 2) {
             av_log(s, AV_LOG_ERROR,
                    "Invalid number of bytes per sample: %d\n", ea->bytes);
             ea->audio_codec = AV_CODEC_ID_NONE;