mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/sgirledec: Check input length
Fixes: Timeout Fixes: 71712/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SGIRLE_fuzzer-5763700835811328 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
8367d7e184
commit
5f471b500c
|
@ -115,6 +115,9 @@ static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (avpkt->size * 192ll / 2 < avctx->width * avctx->height)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue