diff options
Diffstat (limited to 'firmware/lib/gpt_misc.c')
-rw-r--r-- | firmware/lib/gpt_misc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/lib/gpt_misc.c b/firmware/lib/gpt_misc.c index 499cc9e7..dc15d915 100644 --- a/firmware/lib/gpt_misc.c +++ b/firmware/lib/gpt_misc.c @@ -48,7 +48,8 @@ int AllocAndReadGptData(VbExDiskHandle_t disk_handle, GptData *gptdata) /* Only read primary GPT if the primary header is valid */ GptHeader* primary_header = (GptHeader*)gptdata->primary_header; - if (0 == CheckHeader(primary_header, 0, gptdata->gpt_drive_sectors, + if (0 == CheckHeader(primary_header, 0, gptdata->drive_sectors, + gptdata->gpt_drive_sectors, gptdata->stored_on_device)) { primary_valid = 1; if (0 != VbExDiskRead(disk_handle, @@ -67,7 +68,8 @@ int AllocAndReadGptData(VbExDiskHandle_t disk_handle, GptData *gptdata) /* Only read secondary GPT if the secondary header is valid */ GptHeader* secondary_header = (GptHeader*)gptdata->secondary_header; - if (0 == CheckHeader(secondary_header, 1, gptdata->gpt_drive_sectors, + if (0 == CheckHeader(secondary_header, 1, gptdata->drive_sectors, + gptdata->gpt_drive_sectors, gptdata->stored_on_device)) { secondary_valid = 1; if (0 != VbExDiskRead(disk_handle, |