| Submitter | Andy Whitcroft |
|---|---|
| Date | Sept. 14, 2011, 11:48 a.m. |
| Message ID | <1316000900-1542-3-git-send-email-apw@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/114664/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c index 3ac773d..86a1859 100644 --- a/fs/partitions/efi.c +++ b/fs/partitions/efi.c @@ -356,6 +356,12 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba, goto fail; } + /* Check that sizeof_partition_entry has the correct value */ + if (le32_to_cpu((*gpt)->sizeof_partition_entry) != sizeof(gpt_entry)) { + pr_debug("GUID Partitition Entry Size check failed.\n"); + goto fail; + } + if (!(*ptes = alloc_read_gpt_entries(state, *gpt))) goto fail;