mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/exr: skip bottom clearing loop when its outside the image
Fixes: signed integer overflow: 1633771809 * 32960 cannot be represented in type 'int' Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 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
908e836bca
commit
97c89068e9
|
@ -1821,10 +1821,12 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||||
avctx->execute2(avctx, decode_block, s->thread_data, NULL, nb_blocks);
|
avctx->execute2(avctx, decode_block, s->thread_data, NULL, nb_blocks);
|
||||||
|
|
||||||
// Zero out the end if ymax+1 is not h
|
// Zero out the end if ymax+1 is not h
|
||||||
ptr = picture->data[0] + ((s->ymax+1) * picture->linesize[0]);
|
if ((s->ymax+1) < avctx->height) {
|
||||||
for (y = s->ymax + 1; y < avctx->height; y++) {
|
ptr = picture->data[0] + ((s->ymax+1) * picture->linesize[0]);
|
||||||
memset(ptr, 0, out_line_size);
|
for (y = s->ymax + 1; y < avctx->height; y++) {
|
||||||
ptr += picture->linesize[0];
|
memset(ptr, 0, out_line_size);
|
||||||
|
ptr += picture->linesize[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
picture->pict_type = AV_PICTURE_TYPE_I;
|
picture->pict_type = AV_PICTURE_TYPE_I;
|
||||||
|
|
Loading…
Reference in New Issue