aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-07-10 19:37:57 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-09 13:37:20 +0200
commit14a4be8fb4800fbac9e3e9a884527a7b582591a1 (patch)
treea79a81bf2958fdcde2bef2447529c2e03c5475ff
parent02fd603a182f589128aa7e951d218ad1dd35dd8b (diff)
downloadffmpeg-14a4be8fb4800fbac9e3e9a884527a7b582591a1.tar.gz
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@niedermayer.cc> (cherry picked from commit 4a10bc8f6f5d600c44ecb9b43cd9abf13bf3bfae) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/cbs_jpeg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c
index b78c305551..bb1b3f0c87 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;