Commit 832652a9 authored by Michael Niedermayer's avatar 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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4a10bc8f6f5d600c44ecb9b43cd9abf13bf3bfae)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9ee65bf8
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment