mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 10:22:10 +00:00
avcodec/cri: Stop the bitreader at the end of uncompressed input
Fixes: Timeout Fixes: 29983/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6420415838814208 Fixes: 30595/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6559089360502784 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
52cc323735
commit
497e747387
@ -335,6 +335,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user