From 0a0630133055c3b3daa3072a3fd9944a1a149401 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 2 Jun 2022 16:02:54 +0200
Subject: [PATCH] libblkid: (bsd) fix buffer pointer use [fuzzing]

Reported-by: Thibault Guittet <tguittet@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
---
 libblkid/src/partitions/bsd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libblkid/src/partitions/bsd.c b/libblkid/src/partitions/bsd.c
index c74517334f..7a0b23195e 100644
--- a/libblkid/src/partitions/bsd.c
+++ b/libblkid/src/partitions/bsd.c
@@ -50,7 +50,7 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag)
 		goto nothing;
 	}
 
-	l = (struct bsd_disklabel *) data + BLKID_MAG_LASTOFFSET(mag);
+	l = (struct bsd_disklabel *) (data + BLKID_MAG_LASTOFFSET(mag));
 
 	ls = blkid_probe_get_partlist(pr);
 	if (!ls)
