Browse Source

avcodec/scpr: Fix reading a pixel before the first

Fixes: 5540/clusterfuzz-testcase-minimized-6122458273808384

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0fb33a8289)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.3.7
Michael Niedermayer 8 years ago
parent
commit
55e6c6b5fe
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/scpr.c

+ 4
- 0
libavcodec/scpr.c View File

@@ -679,6 +679,8 @@ static int decompress_p(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;

if (bx == 0) {
if (by < 2)
return AVERROR_INVALIDDATA;
z = backstep;
} else {
z = 0;
@@ -708,6 +710,8 @@ static int decompress_p(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;

if (bx == 0) {
if (by < 2)
return AVERROR_INVALIDDATA;
z = backstep;
} else {
z = 0;


Loading…
Cancel
Save