All checksums should be tests with this function to keep checksum
validation configurable.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit
fce366c4982273cd73df727338ed02d9f357b6c6)
/* Validate entries */
crc = count_crc32((unsigned char *) *ents, esz, 0, 0);
- if (crc != le32_to_cpu(h->partition_entry_array_crc32)) {
+ if (!blkid_probe_verify_csum(pr, crc, le32_to_cpu(h->partition_entry_array_crc32))) {
DBG(LOWPROBE, ul_debug("GPT entries corrupted"));
return NULL;
}