]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (bsd) fix buffer pointer use [fuzzing]
authorKarel Zak <kzak@redhat.com>
Thu, 2 Jun 2022 14:02:54 +0000 (16:02 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Jul 2022 15:49:25 +0000 (17:49 +0200)
Reported-by: Thibault Guittet <tguittet@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/partitions/bsd.c

index c74517334f0d5535fd9602f25876ee6036e1d1a8..7a0b23195e8e0b3387bcec48f699a4389185b785 100644 (file)
@@ -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)