mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-11 07:38:20 +02:00
blorp: cast uint32_t -> int64_t to avoid potential overflow
In practice, I don't think it's actually going to overflow, but it could in theory, which coverity is pointing out. CID: 1647010 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35114>
This commit is contained in:
parent
f1a9c2b55c
commit
2a3cf70db8
1 changed files with 1 additions and 1 deletions
|
|
@ -535,7 +535,7 @@ blorp_fast_clear(struct blorp_batch *batch,
|
|||
const int phys_height0 = ALIGN(surf->surf->logical_level0_px.h,
|
||||
surf->surf->image_alignment_el.h);
|
||||
unaligned_height = phys_height0 % 32;
|
||||
size_B = surf->surf->row_pitch_B * (phys_height0 - unaligned_height);
|
||||
size_B = (int64_t)surf->surf->row_pitch_B * (phys_height0 - unaligned_height);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue