summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcs.c
diff options
context:
space:
mode:
authorKarel Zak2014-03-11 11:22:07 +0100
committerKarel Zak2014-03-11 11:22:07 +0100
commit873e7a59d7be7db56573eef271d23867e3dfa47b (patch)
tree290719f5357edc424b93a4711b05fd65fe2193c8 /sys-utils/ipcs.c
parentlib/colors: support <name>.enable too (diff)
downloadkernel-qcow2-util-linux-873e7a59d7be7db56573eef271d23867e3dfa47b.tar.gz
kernel-qcow2-util-linux-873e7a59d7be7db56573eef271d23867e3dfa47b.tar.xz
kernel-qcow2-util-linux-873e7a59d7be7db56573eef271d23867e3dfa47b.zip
ipcs: fix size_t overflow
Addresses: https://github.com/karelzak/util-linux/issues/51 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/ipcs.c')
-rw-r--r--sys-utils/ipcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 16e520649..90d6e0e99 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -201,7 +201,7 @@ static void do_shm (char format, int unit)
_("max seg size"), lim.shmmax, "\n", 0);
ipc_print_size(unit == IPC_UNIT_DEFAULT ? IPC_UNIT_KB : unit,
_("max total shared memory"),
- lim.shmall * getpagesize(), "\n", 0);
+ (uint64_t) lim.shmall * getpagesize(), "\n", 0);
ipc_print_size(unit == IPC_UNIT_DEFAULT ? IPC_UNIT_BYTES : unit,
_("min seg size"), lim.shmmin, "\n", 0);
return;