diff options
author | Colin Cross <ccross@android.com> | 2011-08-08 17:16:17 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-08-08 17:16:17 -0700 |
commit | 468c64fd402ad29dcc8ffbe5b9efb8acf36c7e55 (patch) | |
tree | 03a80f7a55d53243c3a4e125e51290e76bb9e48a /fs/partitions/efi.c | |
parent | 9c0f85dc32867c3d0615bcf626321584db801b2f (diff) | |
parent | ea0dc0dc1c1dca25e50384e300a528db57ee7de5 (diff) |
Merge commit 'v2.6.39.4' into linux-tegra-2.6.39
Diffstat (limited to 'fs/partitions/efi.c')
-rw-r--r-- | fs/partitions/efi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c index 19d6750d1d6c..6296b403c67a 100644 --- a/fs/partitions/efi.c +++ b/fs/partitions/efi.c @@ -310,6 +310,15 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba, goto fail; } + /* Check the GUID Partition Table header size */ + if (le32_to_cpu((*gpt)->header_size) > + bdev_logical_block_size(state->bdev)) { + pr_debug("GUID Partition Table Header size is wrong: %u > %u\n", + le32_to_cpu((*gpt)->header_size), + bdev_logical_block_size(state->bdev)); + goto fail; + } + /* Check the GUID Partition Table CRC */ origcrc = le32_to_cpu((*gpt)->header_crc32); (*gpt)->header_crc32 = 0; |