Fixes: Timeout Fixes: 29983/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6420415838814208
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavcodec/cri.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/cri.c b/libavcodec/cri.c index f7c3b4ef48..2d33b54e42 100644 --- a/libavcodec/cri.c +++ b/libavcodec/cri.c @@ -331,6 +331,9 @@ skip: for (int y = 0; y < avctx->height; y++) { uint16_t *dst = (uint16_t *)(p->data[0] + y * p->linesize[0]); + if (get_bits_left(&gbit) < avctx->width * bps) + break; + for (int x = 0; x < avctx->width; x++) dst[x] = get_bits(&gbit, bps) << shift; } -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".