diff options
author | William Pitcock <nenolod@dereferenced.org> | 2017-07-16 23:22:41 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-07-16 23:22:41 +0000 |
commit | 6cd63892c8438be7e16de83fac1bb931087ab7e1 (patch) | |
tree | 1b095bdc4e6b3713c8d4b379fa8c38463d730cff /main/busybox | |
parent | acc627e27df2b0384c2fac110a92f775da97459c (diff) | |
download | aports-6cd63892c8438be7e16de83fac1bb931087ab7e1.tar.bz2 aports-6cd63892c8438be7e16de83fac1bb931087ab7e1.tar.xz |
main/pkgconf: upgrade to 1.3.8
Diffstat (limited to 'main/busybox')
-rw-r--r-- | main/busybox/top-buffer-overflow.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/main/busybox/top-buffer-overflow.patch b/main/busybox/top-buffer-overflow.patch new file mode 100644 index 0000000000..14b23c6488 --- /dev/null +++ b/main/busybox/top-buffer-overflow.patch @@ -0,0 +1,20 @@ +--- busybox-1.27.0.orig/procps/top.c ++++ busybox-1.27.0/procps/top.c +@@ -694,10 +694,14 @@ + CALC_STAT(pcpu, (s->pcpu*pcpu_scale + pcpu_half) >> pcpu_shift); + #endif + +- if (s->vsz >= 100000) +- sprintf(vsz_str_buf, "%6ldm", s->vsz/1024); ++ if ((s->vsz / (1024 * 1024)) >= 100000) ++ snprintf(vsz_str_buf, sizeof(vsz_str_buf), "%6ldt", s->vsz/(1024 * 1024 * 1024)); ++ else if ((s->vsz / 1024) >= 100000) ++ snprintf(vsz_str_buf, sizeof(vsz_str_buf), "%6ldg", s->vsz/(1024 * 1024)); ++ else if (s->vsz >= 100000) ++ snprintf(vsz_str_buf, sizeof(vsz_str_buf), "%6ldm", s->vsz/1024); + else +- sprintf(vsz_str_buf, "%7lu", s->vsz); ++ snprintf(vsz_str_buf, sizeof(vsz_str_buf), "%7lu", s->vsz); + /* PID PPID USER STAT VSZ %VSZ [%CPU] COMMAND */ + col = snprintf(line_buf, scr_width, + "\n" "%5u%6u %-8.8s %s%s" FMT |