From ee7f1e9e0857fbf6da3e360fe77f0c4c7bcf42eb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 11 Oct 2017 14:50:43 +0200 Subject: [PATCH] libfdisk: (sun) make math more robust [coverity scan] Signed-off-by: Karel Zak --- libblkid/src/partitions/sun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libblkid/src/partitions/sun.c b/libblkid/src/partitions/sun.c index c0dddc8626..058a663727 100644 --- a/libblkid/src/partitions/sun.c +++ b/libblkid/src/partitions/sun.c @@ -52,7 +52,7 @@ static int probe_sun_pt(blkid_probe pr, goto err; /* sectors per cylinder (partition offset is in cylinders...) */ - spc = be16_to_cpu(l->nhead) * be16_to_cpu(l->nsect); + spc = (uint64_t) be16_to_cpu(l->nhead) * be16_to_cpu(l->nsect); DBG(LOWPROBE, ul_debug("Sun VTOC sanity=%u version=%u nparts=%u", be32_to_cpu(l->vtoc.sanity), -- 2.47.2