OSDN Git Service

avformat/ipmovie: Check OPCODE_CREATE_TIMER size
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 14 Dec 2013 20:22:14 +0000 (21:22 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 14 Dec 2013 20:59:28 +0000 (21:59 +0100)
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f81e836ef8c_5930_ipmovie_interplayvideo_interplay_dpcm__bislogo.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/ipmovie.c

index ff5699a..57664f1 100644 (file)
@@ -321,7 +321,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
 
         case OPCODE_CREATE_TIMER:
             av_dlog(NULL, "create timer\n");
-            if ((opcode_version > 0) || (opcode_size > 6)) {
+            if ((opcode_version > 0) || (opcode_size != 6)) {
                 av_dlog(NULL, "bad create_timer opcode\n");
                 chunk_type = CHUNK_BAD;
                 break;