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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user