mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 17:39:08 +00:00
avcodec/dovi_rpudec: bound num_x/y_partitions
Fixes: out of array access
Fixes: SUcVEyk7r3Gc
Found-by: Kenan Alghythee <kalghy2@uic.edu>
(cherry picked from commit 79e10e5196)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -582,6 +582,8 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size,
|
||||
|
||||
mapping->num_x_partitions = get_ue_golomb_long(gb) + 1;
|
||||
mapping->num_y_partitions = get_ue_golomb_long(gb) + 1;
|
||||
VALIDATE(mapping->num_x_partitions, 1, 0xFFFF);
|
||||
VALIDATE(mapping->num_y_partitions, 1, 0xFFFF);
|
||||
/* End of rpu_data_header(), start of vdr_rpu_data_payload() */
|
||||
|
||||
for (int c = 0; c < 3; c++) {
|
||||
|
||||
Reference in New Issue
Block a user