1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-26 14:14:54 +02:00

avformat/ipmovie: Fix use of uninitialized memory in OPCODE_INIT_VIDEO_BUFFERS

Fixes: msan_uninit-mem_7ffe323a25f3_5929_ipmovie_interplayvideo_interplay_dpcm__bislogo.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-13 19:50:34 +01:00
parent 7439475e69
commit 7d7a701362

View File

@ -376,7 +376,9 @@ 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) || opcode_size < 4) {
if ((opcode_version > 2) || (opcode_size > 8) || opcode_size < 4
|| opcode_version == 2 && opcode_size < 8
) {
av_dlog(NULL, "bad init_video_buffers opcode\n");
chunk_type = CHUNK_BAD;
break;