avcodec/cbs_h265_syntax_template: Limit sps_num_palette_predictor_initializer_minus1...
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 19 Sep 2021 20:35:36 +0000 (22:35 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 5 Oct 2021 21:19:39 +0000 (23:19 +0200)
commitb90ce02f818fefa320a758ad0f76498d77de4da7
treec3410101e5922040100c8ea7d0cfc139b3c46385
parenta0e38aceba43526cd01d27e16e83d51f7518622a
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>
(cherry picked from commit 85413a5ae6948a1d6e4e947a4fca984b8c686016)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cbs_h265_syntax_template.c