radeonsi/vcn: Fix out of bounds write when invalidating QP map regions
Fixes coverity issue 1559460 Out-of-bounds write
Fixes: 9c07a2e10d ("radeonsi/vcn: ROI feature implementation")
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31558>
This commit is contained in:
@@ -177,7 +177,7 @@ static void radeon_vcn_enc_get_roi_param(struct radeon_encoder *enc,
|
||||
qp_map->width_in_block = width_in_block;
|
||||
qp_map->height_in_block = height_in_block;
|
||||
|
||||
for (i = RENCODE_QP_MAP_MAX_REGIONS; i >= roi->num; i--)
|
||||
for (i = RENCODE_QP_MAP_MAX_REGIONS - 1; i >= roi->num; i--)
|
||||
enc->enc_pic.enc_qp_map.map[i].is_valid = false;
|
||||
|
||||
/* reverse the map sequence */
|
||||
|
||||
Reference in New Issue
Block a user