summaryrefslogtreecommitdiffstats
path: root/libblkid
diff options
context:
space:
mode:
authorKarel Zak2017-10-11 14:50:43 +0200
committerKarel Zak2017-10-11 14:50:43 +0200
commitee7f1e9e0857fbf6da3e360fe77f0c4c7bcf42eb (patch)
tree91c5c5ed45ca47e0d0e73e7c258b3ccc03fca152 /libblkid
parentlib/pager: check open() return code [coverity scan] (diff)
downloadkernel-qcow2-util-linux-ee7f1e9e0857fbf6da3e360fe77f0c4c7bcf42eb.tar.gz
kernel-qcow2-util-linux-ee7f1e9e0857fbf6da3e360fe77f0c4c7bcf42eb.tar.xz
kernel-qcow2-util-linux-ee7f1e9e0857fbf6da3e360fe77f0c4c7bcf42eb.zip
libfdisk: (sun) make math more robust [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid')
-rw-r--r--libblkid/src/partitions/sun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libblkid/src/partitions/sun.c b/libblkid/src/partitions/sun.c
index c0dddc862..058a66372 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),