From e97a4a7d0e4de023f24103c3a4a6847184150bcd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 2 Jun 2022 16:02:54 +0200 Subject: [PATCH] libblkid: (bsd) fix buffer pointer use [fuzzing] Reported-by: Thibault Guittet Signed-off-by: Karel Zak --- 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) -- 2.47.2