mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 17:50:39 +02:00
anv: Fix potential overflow from doing 32bit math on 64bit types
By using a 64bit unsigned to iterate instead of a plain unsigned CID: 1646981 Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35243>
This commit is contained in:
parent
a6102f7432
commit
79f4eca2f0
1 changed files with 1 additions and 1 deletions
|
|
@ -293,7 +293,7 @@ anv_slab_alloc(void *priv,
|
|||
struct anv_bo *bo = &slab->entries[i];
|
||||
uint64_t offset = intel_48b_address(slab->bo->offset);
|
||||
|
||||
offset += (i * entry_size);
|
||||
offset += ((uint64_t)i * entry_size);
|
||||
|
||||
bo->name = "slab_child";
|
||||
bo->gem_handle = slab->bo->gem_handle;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue