Browse Source

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>
(cherry picked from commit 7ac5067146)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.3.1
Michael Niedermayer 8 years ago
parent
commit
79f6a1b96e
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/scpr.c

+ 3
- 0
libavcodec/scpr.c View File

@@ -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;


Loading…
Cancel
Save