mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-14 22:22:59 +02:00
avcodec/vble: Allocate buffer later
Fixes: Timeout Fixes: 71727/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VBLE_fuzzer-6126342574243840 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
5f471b500c
commit
03050a0d90
@ -130,10 +130,6 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* Allocate buffer */
|
||||
if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
/* Version should always be 1 */
|
||||
version = AV_RL32(src);
|
||||
|
||||
@ -148,6 +144,10 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* Allocate buffer */
|
||||
if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
/* Restore planes. Should be almost identical to Huffyuv's. */
|
||||
vble_restore_plane(ctx, pic, &gb, 0, offset, avctx->width, avctx->height);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user