mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/scpr3: Check bx
Fixes: Out of array access Fixes: 55102/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-4877396618903552 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:
parent
4d42d82563
commit
cc7e984a05
@ -1167,6 +1167,9 @@ static int decompress_p3(AVCodecContext *avctx,
|
||||
int run, bx = x * 16 + sx1, by = y * 16 + sy1;
|
||||
uint32_t clr, ptype = 0, r, g, b;
|
||||
|
||||
if (bx >= avctx->width)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
for (; by < y * 16 + sy2 && by < avctx->height;) {
|
||||
ret = decode_value3(s, 5, &s->op_model3[ptype].cntsum,
|
||||
s->op_model3[ptype].freqs[0],
|
||||
|
Loading…
x
Reference in New Issue
Block a user