You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
551 B

diff -up procps-ng-3.3.10/pmap.c.ori procps-ng-3.3.10/pmap.c
--- procps-ng-3.3.10/pmap.c.ori 2017-02-20 10:47:08.292453148 +0100
+++ procps-ng-3.3.10/pmap.c 2017-02-20 10:49:05.078924572 +0100
@@ -615,7 +615,7 @@ static int one_proc(proc_t * p)
total_private_dirty += smap_value;
continue;
}
- if (strncmp("Swap", smap_key, 4) == 0) {
+ if ((strncmp("Swap", smap_key, 4) == 0) && (strlen(smap_key)==4)) {
/*doesn't matter as long as last */
printf("%0*" KLF "x %*lu %*llu %*llu %*s %s\n",
maxw1, start,