Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252062
b: refs/heads/master
c: 3eb8e74
h: refs/heads/master
v: v3
  • Loading branch information
Timo Warns authored and Linus Torvalds committed May 27, 2011
1 parent 1d604ee commit 2383b29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 658c74cf3c98b1c9bc21e26731052db66251dfd8
refs/heads/master: 3eb8e74ec72736b9b9d728bad30484ec89c91dde
9 changes: 9 additions & 0 deletions trunk/fs/partitions/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2383b29

Please sign in to comment.