libfdisk: (sun) make math more robust [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2017-10-11 14:50:43 +02:00
parent 1458c5c750
commit ee7f1e9e08
1 changed files with 1 additions and 1 deletions

View File

@ -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),