diff options
author | Bill Richardson <wfrichar@chromium.org> | 2010-08-27 09:31:26 -0700 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2010-08-27 09:31:26 -0700 |
commit | aa8eda4f97f43a51bfec4fc096635565617a89e0 (patch) | |
tree | f38ba6d6e59dccd6a6c4770f12a0b7769864641f /firmware | |
parent | 5896b9664d088699e246de964a7c374af663a34e (diff) | |
download | vboot-aa8eda4f97f43a51bfec4fc096635565617a89e0.tar.gz |
More cgptlib tests
Add some extra cases to SanityCheckTest() to test both header and entries
being garbled at either end of the disk.
Add DuplicateUniqueGuidTest() to check that GPTs having duplicate
UniqueGuids in the entries are rejected. We can only check this per-disk, of
course.
Made some changes to the library to enforce the UniqueGuid requirement that
I just started testing for.
BUG=chromium-os:4854
Review URL: http://codereview.chromium.org/3135044
Change-Id: I86458faf9cc99aa3f29aac0d5b144dbd05067181
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/lib/cgptlib/cgptlib_internal.c | 4 | ||||
-rw-r--r-- | firmware/version.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/firmware/lib/cgptlib/cgptlib_internal.c b/firmware/lib/cgptlib/cgptlib_internal.c index a0c16886..ee3c87f1 100644 --- a/firmware/lib/cgptlib/cgptlib_internal.c +++ b/firmware/lib/cgptlib/cgptlib_internal.c @@ -152,6 +152,10 @@ int CheckEntries(GptEntry* entries, GptHeader* h) { if ((entry->ending_lba >= e2->starting_lba) && (entry->ending_lba <= e2->ending_lba)) return 1; + + /* UniqueGuid field must be unique. */ + if (0 == Memcmp(&entry->unique, &e2->unique, sizeof(Guid))) + return 1; } } diff --git a/firmware/version.c b/firmware/version.c index 73f10a5f..0ecee87b 100644 --- a/firmware/version.c +++ b/firmware/version.c @@ -1 +1 @@ -char* VbootVersion = "VBOOv=8dd12638"; +char* VbootVersion = "VBOOv=c58c9bc8"; |