You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/cri: Check bytestream2_get_buffer() for end
Fixes: use of uninintialized memory Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5910856640823296 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:
committed by
michaelni
parent
d9bf3c141b
commit
ea3851bebf
@ -220,7 +220,8 @@ static int cri_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
||||
break;
|
||||
case 102:;
|
||||
int read_len = FFMIN(length, sizeof(codec_name) - 1);
|
||||
bytestream2_get_buffer(gb, codec_name, read_len))
|
||||
if (read_len != bytestream2_get_buffer(gb, codec_name, read_len))
|
||||
return AVERROR_INVALIDDATA;
|
||||
length -= read_len;
|
||||
if (strncmp(codec_name, "cintel_craw", read_len))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
Reference in New Issue
Block a user