diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-11 22:03:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-31 19:51:57 +0100 |
commit | 075b33779849c63f8cf589068d2003dc82014800 (patch) | |
tree | 2d11b11b797ce692b86998643e053414ef5c9e01 /libavcodec/cbs_av1_syntax_template.c | |
parent | 747245ce0e48eccc4a5ad5e6be529f6c9f0d91e4 (diff) | |
download | ffmpeg-075b33779849c63f8cf589068d2003dc82014800.tar.gz |
avcodec/cbs_av1_syntax_template: Check num_y_points
"It is a requirement of bitstream conformance that num_y_points is less than or equal to 14."
Fixes: index 24 out of bounds for type 'uint8_t [24]'
Fixes: 19282/clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_FRAME_MERGE_fuzzer-5747424845103104
Note, also needs a23dd33606d5
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: jamrial
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bbe27890ff7e31e74d024a17123cb073720f2486)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/cbs_av1_syntax_template.c')
-rw-r--r-- | libavcodec/cbs_av1_syntax_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index c843cfa02b..bd70557a2b 100644 --- a/libavcodec/cbs_av1_syntax_template.c +++ b/libavcodec/cbs_av1_syntax_template.c @@ -1045,7 +1045,7 @@ static int FUNC(film_grain_params)(CodedBitstreamContext *ctx, RWContext *rw, return 0; } - fb(4, num_y_points); + fc(4, num_y_points, 0, 14); for (i = 0; i < current->num_y_points; i++) { fbs(8, point_y_value[i], 1, i); fbs(8, point_y_scaling[i], 1, i); |