From 35f1d655819e5d4d11ea1a11061f80e48e35f173 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 18 Oct 2021 09:16:47 -0400 Subject: [PATCH] geom_label: Fix the stable/12 build MAXPHYS is a constant here, use the right name. This is a direct commit to stable/12. Fixes: 116a988f99cd ("geom_label: Add more validation for NTFS volume tasting") Reported by: Jenkins --- sys/geom/label/g_label_ntfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/label/g_label_ntfs.c b/sys/geom/label/g_label_ntfs.c index bcf6a3a72b3..dad55f601e1 100644 --- a/sys/geom/label/g_label_ntfs.c +++ b/sys/geom/label/g_label_ntfs.c @@ -120,7 +120,7 @@ g_label_ntfs_taste(struct g_consumer *cp, char *label, size_t size) mftrecsz = bf->bf_mftrecsz; recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); - if (recsize <= 0 || recsize > maxphys || recsize % pp->sectorsize != 0) + if (recsize <= 0 || recsize > MAXPHYS || recsize % pp->sectorsize != 0) goto done; voloff = bf->bf_mftcn * bf->bf_spc * bf->bf_bps + -- 2.45.0