eamad: fix out of array accesses
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 17 Nov 2012 15:26:55 +0000 (16:26 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 3 Dec 2012 19:45:37 +0000 (20:45 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 63ac64864c6e0e84355aa3caa5b92208997a9a8d)

libavcodec/eamad.c

index b338240..47a9231 100644 (file)
@@ -237,7 +237,7 @@ static int decode_frame(AVCodecContext *avctx,
     int chunk_type;
     int inter;
 
-    if (buf_size < 17) {
+    if (buf_size < 26) {
         av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
         *data_size = 0;
         return -1;