ffmpeg | branch: release/7.0 | Michael Niedermayer <[email protected]> | Sun Aug 3 14:34:59 2025 +0200| [35c127ceba5ceadd6a4bcf114bcdc21667207e28] | committer: Michael Niedermayer
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 <[email protected]> (cherry picked from commit ea3851bebf91a96b11d16be2b36bf88111e30e36) Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35c127ceba5ceadd6a4bcf114bcdc21667207e28 --- libavcodec/cri.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/cri.c b/libavcodec/cri.c index 642ec26cc1..12a12f5d31 100644 --- a/libavcodec/cri.c +++ b/libavcodec/cri.c @@ -222,7 +222,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; _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
