OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff1e30c
)
avcodec/interplayvideo: Check that enough data is available for opcode_0x9
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 18 Dec 2013 23:17:12 +0000
(
00:17
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 18 Dec 2013 23:38:11 +0000
(
00:38
+0100)
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>
libavcodec/interplayvideo.c
patch
|
blob
|
history
diff --git
a/libavcodec/interplayvideo.c
b/libavcodec/interplayvideo.c
index
71f89ab
..
645fc16
100644
(file)
--- 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);