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:
8a69f26
)
avcodec/scpr: Check y in first line loop in decompress_i()
author
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 11 May 2017 13:29:31 +0000
(15:29 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 11 May 2017 13:51:08 +0000
(15:51 +0200)
Fixes: out of array access
Fixes: 1478/clusterfuzz-testcase-minimized-
5285486908145664
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/scpr.c
patch
|
blob
|
history
diff --git
a/libavcodec/scpr.c
b/libavcodec/scpr.c
index
ba1f65f
..
b87c047
100644
(file)
--- a/
libavcodec/scpr.c
+++ b/
libavcodec/scpr.c
@@
-331,6
+331,9
@@
static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
clr = (b << 16) + (g << 8) + r;
k += run;
while (run-- > 0) {
+ if (y >= avctx->height)
+ return AVERROR_INVALIDDATA;
+
dst[y * linesize + x] = clr;
lx = x;
ly = y;