From 2a3cf70db883099f5004803dbfa027b682e25251 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 22 May 2025 09:13:11 -0700 Subject: [PATCH] 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 Part-of: --- src/intel/blorp/blorp_clear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index 0181db0829b..1ccb3df227e 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -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); } }