:: commit 6598649c02a5580755e1989e50544e090b05dfaa

Mintsuki <mintsuki@protonmail.com> — 2025-12-24 22:02

parents: 055e9a203a

lib/part: Get rid of overzealous check added in 055e9a203afc988974ef9b8e919e365061470a6c

diff --git a/common/lib/part.s2.c b/common/lib/part.s2.c
index 11ec69e0..25ff3453 100644
--- a/common/lib/part.s2.c
+++ b/common/lib/part.s2.c
@@ -500,11 +500,6 @@ static int mbr_get_part(struct volume *ret, struct volume *volume, int partition
         return NO_PARTITION;
     }
 
-    // Check for overflow: first_sect + sect_count must not overflow
-    if ((uint64_t)entry.first_sect > UINT64_MAX - entry.sect_count) {
-        return NO_PARTITION;  // Partition would overflow
-    }
-
 #if defined (UEFI)
     ret->efi_handle  = volume->efi_handle;
     ret->block_io    = volume->block_io;
tab: 248 wrap: offon