65afea1e3b
- Reference patch procps-ng-3.3.15-typo.patch this patch add a missed parenthesis for a nroff macro that is \*We become \*(We in line 2186 of top/top.1 - Update to procps-ng-3.3.15 (bsc#1092100) * library: Increment to 8:0:1 No removals, no new functions Changes: slab and pid structures * library: Just check for SIGLOST and don't delete it issue #93 * library: Fix integer overflow and LPE in file2strvec CVE-2018-1124 * library: Use size_t for alloc functions CVE-2018-1126 * library: Increase comm size to 64 * pgrep: Fix stack-based buffer overflow CVE-2018-1125 * pgrep: Remove >15 warning as comm can be longer issue #92 * ps: Fix buffer overflow in output buffer, causing DOS CVE-2018-1123 * ps: Increase command name selection field to 64 * top: Don't use cwd for location of config CVE-2018-1122 - Increase so major number OBS-URL: https://build.opensuse.org/request/show/614832 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/procps?expand=0&rev=112
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
---
|
|
top/top.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
--- top/top.c
|
|
+++ top/top.c 2018-04-04 11:49:56.472660056 +0000
|
|
@@ -1704,9 +1704,9 @@ static inline const char *make_str_utf8
|
|
static const char *scale_mem (int target, unsigned long num, int width, int justr) {
|
|
// SK_Kb SK_Mb SK_Gb SK_Tb SK_Pb SK_Eb
|
|
#ifdef BOOST_MEMORY
|
|
- static const char *fmttab[] = { "%.0f", "%#.1f%c", "%#.3f%c", "%#.3f%c", "%#.3f%c", NULL };
|
|
+ static const char *fmttab[] = { "%.0f", "%#.1f%c", "%#.3f%c", "%#.3f%c", "%#.3f%c", "%#.3f%c", NULL };
|
|
#else
|
|
- static const char *fmttab[] = { "%.0f", "%.1f%c", "%.1f%c", "%.1f%c", "%.1f%c", NULL };
|
|
+ static const char *fmttab[] = { "%.0f", "%.1f%c", "%.1f%c", "%.1f%c", "%.1f%c", "%.1f%c", NULL };
|
|
#endif
|
|
static char buf[SMLBUFSIZ];
|
|
float scaled_num;
|
|
@@ -1718,7 +1718,7 @@ static const char *scale_mem (int target
|
|
goto end_justifies;
|
|
|
|
scaled_num = num;
|
|
- for (i = SK_Kb, psfx = Scaled_sfxtab; i < SK_Eb; psfx++, i++) {
|
|
+ for (i = SK_Kb, psfx = Scaled_sfxtab; i <= SK_Eb; psfx++, i++) {
|
|
if (i >= target
|
|
&& (width >= snprintf(buf, sizeof(buf), fmttab[i], scaled_num, *psfx)))
|
|
goto end_justifies;
|