mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
avcodec/cllc: Check bitstream end before decoding pixels
Fixes timeout Fixes: 1802/clusterfuzz-testcase-minimized-5008293510512640 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
bce362d36c
commit
cfec0d6475
@ -429,6 +429,9 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
|
||||
coding_type = (AV_RL32(src) >> 8) & 0xFF;
|
||||
av_log(avctx, AV_LOG_DEBUG, "Frame coding type: %d\n", coding_type);
|
||||
|
||||
if(get_bits_left(&gb) < avctx->height * avctx->width)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
switch (coding_type) {
|
||||
case 0:
|
||||
avctx->pix_fmt = AV_PIX_FMT_YUV422P;
|
||||
|
Loading…
Reference in New Issue
Block a user