From ffbec06d3bf6f307364822a178c7c1b7679c65b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Thu, 28 Sep 2023 00:51:42 +0200 Subject: [PATCH] libblkid: (probe) handle probe without chain gracefully MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Weißschuh --- libblkid/src/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c index 6c17fb457c..49d202772d 100644 --- a/libblkid/src/probe.c +++ b/libblkid/src/probe.c @@ -1902,7 +1902,7 @@ int blkid_probe_verify_csum_buf(blkid_probe pr, size_t n, const void *csum, /* * Accept bad checksum if BLKID_SUBLKS_BADCSUM flags is set */ - if (chn->driver->id == BLKID_CHAIN_SUBLKS + if (chn && chn->driver->id == BLKID_CHAIN_SUBLKS && (chn->flags & BLKID_SUBLKS_BADCSUM)) { blkid_probe_set_value(pr, "SBBADCSUM", (unsigned char *) "1", 2); goto accept; -- 2.47.2