diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c index 676363b628..368c05922d 100644 --- a/libavformat/ipmovie.c +++ b/libavformat/ipmovie.c @@ -376,7 +376,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, case OPCODE_INIT_VIDEO_BUFFERS: av_dlog(NULL, "initialize video buffers\n"); - if ((opcode_version > 2) || (opcode_size > 8)) { + if ((opcode_version > 2) || (opcode_size > 8) || opcode_size < 4) { av_dlog(NULL, "bad init_video_buffers opcode\n"); chunk_type = CHUNK_BAD; break;