mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
anv: avoid potential integer overflow in video address calculation
Coverity caught one instance of this, by visual inspection I found
another case.
Fixes: 3fb25cc78a ("anv: Add support for creating layered surfaces for video encode/decode")
CID: 1665326
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37262>
This commit is contained in:
parent
011ba1842e
commit
70ebc14de9
1 changed files with 2 additions and 2 deletions
|
|
@ -6620,7 +6620,7 @@ anv_image_dmv_top_address(const struct anv_image_view *iv,
|
|||
return addr;
|
||||
|
||||
return anv_address_add(addr, iv->image->vid_dmv_top_surface_pitch_B *
|
||||
(iv->vk.base_array_layer + arrayLayer));
|
||||
((uint64_t)iv->vk.base_array_layer + arrayLayer));
|
||||
}
|
||||
|
||||
static inline struct anv_address MUST_CHECK
|
||||
|
|
@ -6637,7 +6637,7 @@ anv_image_av1_table_address(const struct anv_image_view *iv,
|
|||
return addr;
|
||||
|
||||
return anv_address_add(addr, iv->image->av1_cdf_table_pitch_B *
|
||||
(iv->vk.base_array_layer + arrayLayer));
|
||||
((uint64_t)iv->vk.base_array_layer + arrayLayer));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue