]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: gpt: use generic checksum handling
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 26 Dec 2022 23:04:40 +0000 (23:04 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 26 Dec 2022 23:57:48 +0000 (23:57 +0000)
libblkid/src/partitions/gpt.c

index af6257ab7f8fb4f3e99e050156825228797fb4a8..89e7bb679b9d2245b6746df45f749a9186f57aa9 100644 (file)
@@ -241,7 +241,7 @@ static struct gpt_header *get_gpt_header(
                        offsetof(struct gpt_header, header_crc32),
                        sizeof(h->header_crc32));
 
-       if (crc != le32_to_cpu(h->header_crc32)) {
+       if (!blkid_probe_verify_csum(pr, crc, le32_to_cpu(h->header_crc32))) {
                DBG(LOWPROBE, ul_debug("GPT header corrupted"));
                return NULL;
        }