mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/cbs_h265_syntax_template: Limit sps_num_palette_predictor_initializer_minus1 to 127
Fixes: index 128 out of bounds for type 'uint16_t [128]' Fixes: 38651/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-6296416058736640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
467c6a9146
commit
85413a5ae6
@ -728,7 +728,7 @@ static int FUNC(sps_scc_extension)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||
|
||||
flag(sps_palette_predictor_initializer_present_flag);
|
||||
if (current->sps_palette_predictor_initializer_present_flag) {
|
||||
ue(sps_num_palette_predictor_initializer_minus1, 0, 128);
|
||||
ue(sps_num_palette_predictor_initializer_minus1, 0, 127);
|
||||
for (comp = 0; comp < (current->chroma_format_idc ? 3 : 1); comp++) {
|
||||
int bit_depth = comp == 0 ? current->bit_depth_luma_minus8 + 8
|
||||
: current->bit_depth_chroma_minus8 + 8;
|
||||
|
Loading…
Reference in New Issue
Block a user