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
committed by naga
parent 38c74c961b
commit 5cab679a07

View File

@@ -1209,7 +1209,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++)
{