mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00: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:
parent
d9bf3c141b
commit
ea3851bebf
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue