avcodec/imm4: Use ff_set_dimensions()
Fixes: Out of memory Fixes: 10970/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IMM4_fuzzer-5698750043914240 Reviewed-by: Paul B Mahol <onemda@gmail.com> 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:
@@ -428,8 +428,9 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n");
|
av_log(avctx, AV_LOG_ERROR, "Frame size change is unsupported.\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
avctx->width = width;
|
ret = ff_set_dimensions(avctx, width, height);
|
||||||
avctx->height = height;
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->changed_size = 1;
|
s->changed_size = 1;
|
||||||
|
Reference in New Issue
Block a user