1c2dee3cc9
It is valid for an on-disk GPT header to report a header size which is greater than 92 bytes. Previously, we would read in the sector and copy only the 92 bytes that we know how to deal with before calculating the checksum for comparison. This meant that when we did the checksum, we overshot the buffer and took in random memory, so the checksum would fail. We now determine the size of the header and allocate enough space to preserve the entire on-disk contents. This allows us to be correctly calculate the checksum and be able to modify and write the header back to the disk, while preserving data that we might not understand. Reported by: Kris Weston Approved by: marcel@ MFC after: 2 weeks |
||
---|---|---|
.. | ||
g_part_apm.c | ||
g_part_bsd.c | ||
g_part_ebr.c | ||
g_part_gpt.c | ||
g_part_if.m | ||
g_part_mbr.c | ||
g_part_pc98.c | ||
g_part_vtoc8.c | ||
g_part.c | ||
g_part.h |