mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-17 15:08:09 +08:00
avcodec/4xm: Check frame_4cc before allocation
Fixes: Timeout Fixes: 403402798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5012819292782592 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:
@ -927,8 +927,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
|
||||
frame_size = buf_size - 12;
|
||||
}
|
||||
|
||||
if ( frame_4cc == AV_RL32("ifr2") || frame_4cc == AV_RL32("ifrm")
|
||||
|| frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")) {
|
||||
if ((ret = ff_get_buffer(avctx, picture, 0)) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (frame_4cc == AV_RL32("ifr2")) {
|
||||
picture->pict_type = AV_PICTURE_TYPE_I;
|
||||
|
Reference in New Issue
Block a user