]> granicus.if.org Git - procps-ng/commitdiff
fix integer overflow on 2GiB+ maps on 32-bit platforms
authorYuriy M. Kaminskiy <yumkam+debian@gmail.com>
Sat, 20 Jun 2015 11:39:41 +0000 (21:39 +1000)
committerCraig Small <csmall@enc.com.au>
Sat, 20 Jun 2015 11:39:41 +0000 (21:39 +1000)
Signed-off-by: Craig Small <csmall@enc.com.au>
pmap.c

diff --git a/pmap.c b/pmap.c
index 17e0e304dcb0f440d8150fe6a74fc285d7343937..ac45f5bba7855d6c90ddc27f208089a3c7787a6a 100644 (file)
--- a/pmap.c
+++ b/pmap.c
@@ -518,7 +518,7 @@ static int one_proc(proc_t * p)
        unsigned long total_shared = 0ul;
        unsigned long total_private_readonly = 0ul;
        unsigned long total_private_writeable = 0ul;
-       KLONG diff = 0;
+       unsigned KLONG diff = 0;
        const char *cp2 = NULL;
        unsigned long long rss = 0ull;
        unsigned long long private_dirty = 0ull;