From b8c35b4aea9b5e383bfa98f975ccf7d1ad15db22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 26 Dec 2022 23:04:40 +0000 Subject: [PATCH] libblkid: gpt: use generic checksum handling --- libblkid/src/partitions/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libblkid/src/partitions/gpt.c b/libblkid/src/partitions/gpt.c index af6257ab7f..89e7bb679b 100644 --- a/libblkid/src/partitions/gpt.c +++ b/libblkid/src/partitions/gpt.c @@ -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; } -- 2.47.3