You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -681,6 +681,8 @@ static int decompress_p(AVCodecContext *avctx,
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (bx == 0) {
|
||||
if (by < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
z = backstep;
|
||||
} else {
|
||||
z = 0;
|
||||
@@ -710,6 +712,8 @@ static int decompress_p(AVCodecContext *avctx,
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (bx == 0) {
|
||||
if (by < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
z = backstep;
|
||||
} else {
|
||||
z = 0;
|
||||
|
Reference in New Issue
Block a user