Skip to content
Permalink
Browse files Browse the repository at this point in the history
avcodec/scpr: Check y in first line loop in decompress_i()
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>
  • Loading branch information
michaelni committed May 11, 2017
1 parent 8a69f26 commit 7ac5067
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libavcodec/scpr.c
Expand Up @@ -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;
Expand Down

0 comments on commit 7ac5067

Please sign in to comment.