diff options
Diffstat (limited to 'extra/htop/fix-segfault-small-terminal.patch')
-rw-r--r-- | extra/htop/fix-segfault-small-terminal.patch | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/extra/htop/fix-segfault-small-terminal.patch b/extra/htop/fix-segfault-small-terminal.patch deleted file mode 100644 index c55146492..000000000 --- a/extra/htop/fix-segfault-small-terminal.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- trunk/Meter.c 2011/08/26 20:52:35 229 -+++ trunk/Meter.c 2011/08/26 20:55:09 230 -@@ -264,13 +264,19 @@ - - w--; - x++; -- char bar[w]; -+ -+ if (w < 1) { -+ attrset(CRT_colors[RESET_COLOR]); -+ return; -+ } -+ char bar[w + 1]; - - int blockSizes[10]; - for (int i = 0; i < w; i++) - bar[i] = ' '; - -- sprintf(bar + (w-strlen(buffer)), "%s", buffer); -+ const size_t barOffset = w - MIN(strlen(buffer), w); -+ snprintf(bar + barOffset, w - barOffset + 1, "%s", buffer); - - // First draw in the bar[] buffer... - double total = 0.0; |