aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2022-12-21 01:04:30 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2022-12-21 01:04:30 +0000
commit2e543af13ab3746c7626c53293c007c8747eff9d (patch)
tree20a3438bdad84c9a24e6830b5ebb5ab534170d71 /sys/geom
parent54f3a781a2ff980034dfe13ff6323c96fc587f1b (diff)
downloadsrc-2e543af13ab3746c7626c53293c007c8747eff9d.tar.gz
src-2e543af13ab3746c7626c53293c007c8747eff9d.zip
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/part/g_part_gpt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c
index cd04fe714fbe..e0c477f467b4 100644
--- a/sys/geom/part/g_part_gpt.c
+++ b/sys/geom/part/g_part_gpt.c
@@ -515,7 +515,8 @@ gpt_read_hdr(struct g_part_gpt_table *table, struct g_consumer *cp,
hdr->hdr_lba_table <= hdr->hdr_lba_end)
goto fail;
lba = hdr->hdr_lba_table +
- howmany(hdr->hdr_entries * hdr->hdr_entsz, pp->sectorsize) - 1;
+ howmany((uint64_t)hdr->hdr_entries * hdr->hdr_entsz,
+ pp->sectorsize) - 1;
if (lba >= last)
goto fail;
if (lba >= hdr->hdr_lba_start && lba <= hdr->hdr_lba_end)