diff options
author | ps <ps@FreeBSD.org> | 2005-02-21 14:35:00 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2005-02-21 14:35:00 +0000 |
commit | c9d616766c09defb6febeed06f19ba9dc8737a52 (patch) | |
tree | c762d15c2287526219ef34157fab206e8e4d6c5e /usr.bin/systat | |
parent | 42f4eba53e633434f928080a746eb1aa1e81e044 (diff) | |
download | FreeBSD-src-c9d616766c09defb6febeed06f19ba9dc8737a52.zip FreeBSD-src-c9d616766c09defb6febeed06f19ba9dc8737a52.tar.gz |
Fix an overflow when calculating the number of kilobytes from the
number of pages.
Obtained from: Yahoo!
Diffstat (limited to 'usr.bin/systat')
-rw-r--r-- | usr.bin/systat/vmstat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index a4a9269..bced789 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -472,7 +472,7 @@ showkre() putfloat(avenrun[1], STATROW, STATCOL + 23, 6, 2, 0); putfloat(avenrun[2], STATROW, STATCOL + 29, 6, 2, 0); mvaddstr(STATROW, STATCOL + 53, buf); -#define pgtokb(pg) ((pg) * s.v_page_size / 1024) +#define pgtokb(pg) ((pg) * (s.v_page_size / 1024)) putint(pgtokb(total.t_arm), MEMROW + 2, MEMCOL + 3, 8); putint(pgtokb(total.t_armshr), MEMROW + 2, MEMCOL + 11, 8); putint(pgtokb(total.t_avm), MEMROW + 2, MEMCOL + 19, 9); |