[FFmpeg-cvslog] avcodec/cbs_jpeg: Fix uninitialized end index in cbs_jpeg_split_fragment()
Michael Niedermayer
git at videolan.org
Sat Jul 11 01:37:02 EEST 2020
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Fri Jul 10 19:37:57 2020 +0200| [832652a9d10e3e19d04aad424efe1e1754a11306] | committer: Michael Niedermayer
avcodec/cbs_jpeg: Fix uninitialized end index in cbs_jpeg_split_fragment()
Fixes: Out of array read
Fixes: 24043/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5084566275751936.fuzz
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 4a10bc8f6f5d600c44ecb9b43cd9abf13bf3bfae)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=832652a9d10e3e19d04aad424efe1e1754a11306
---
libavcodec/cbs_jpeg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c
index 6959ecee7f..471d77074f 100644
--- a/libavcodec/cbs_jpeg.c
+++ b/libavcodec/cbs_jpeg.c
@@ -149,6 +149,7 @@ static int cbs_jpeg_split_fragment(CodedBitstreamContext *ctx,
break;
} else if (marker == JPEG_MARKER_SOS) {
next_marker = -1;
+ end = start;
for (i = start; i + 1 < frag->data_size; i++) {
if (frag->data[i] != 0xff)
continue;
More information about the ffmpeg-cvslog
mailing list