nyx: parted: correct gpt validation check

This fixes an issue when second sector has garbage data that would cause a spinloop.
This commit is contained in:
CTCaer
2026-05-18 14:25:24 +03:00
parent 02ece2293e
commit 07f9043bcd

View File

@@ -968,7 +968,7 @@ static u32 _get_available_l4t_partition()
// Search for a suitable partition.
u32 size_sct = 0;
if (!memcmp(&gpt->header.signature, "EFI PART", 8) || gpt->header.num_part_ents > 128)
if (!memcmp(&gpt->header.signature, "EFI PART", 8) && gpt->header.num_part_ents <= 128)
{
for (u32 i = 0; i < gpt->header.num_part_ents; i++)
{