Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-19 03:17:12 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-12-19 03:38:11 +0400
commit66875798eb88be2f9e49c7d1d1b92aadac1623f6 (patch)
tree09bb0d08bc0157eb82d7f4b529c9c2d47b4a395a /libavcodec/interplayvideo.c
parentff1e30c059386db05131fe2f5bca1f35e1f5ac7e (diff)
avcodec/interplayvideo: Check that enough data is available for opcode_0x9
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7fd5185b45df_5895_interplay-logo-2MB.mve Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 71f89ab920..645fc16e68 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -308,6 +308,11 @@ static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s, AVFrame *frame)
int x, y;
unsigned char P[4];
+ if (bytestream2_get_bytes_left(&s->stream_ptr) < 8) {
+ av_log(s->avctx, AV_LOG_ERROR, "too little data for opcode 0x9\n");
+ return AVERROR_INVALIDDATA;
+ }
+
/* 4-color encoding */
bytestream2_get_buffer(&s->stream_ptr, P, 4);