Date: Wednesday, December 12, 2012 @ 12:28:09 Author: heftig Revision: 173196
Fix a crasher Added: htop/trunk/tree-crash.patch Modified: htop/trunk/PKGBUILD ------------------+ PKGBUILD | 12 +++++++++--- tree-crash.patch | 13 +++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2012-12-12 17:17:00 UTC (rev 173195) +++ PKGBUILD 2012-12-12 17:28:09 UTC (rev 173196) @@ -5,7 +5,7 @@ pkgname=htop pkgver=1.0.2 -pkgrel=1 +pkgrel=2 pkgdesc="Interactive process viewer" arch=('i686' 'x86_64') url="http://htop.sourceforge.net/" @@ -15,8 +15,10 @@ optdepends=('lsof: show files opened by a process' 'strace: attach to a running process') options=('!emptydirs') -source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz") -md5sums=('0d01cca8df3349c74569cefebbd9919e') +source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" + tree-crash.patch) +md5sums=('0d01cca8df3349c74569cefebbd9919e' + '48eba3c0303bfd19d761b859bc69d713') build() { cd "$pkgname-$pkgver" @@ -24,6 +26,10 @@ sed -i 's|ncursesw/curses.h|curses.h|' RichString.[ch] configure sed -i 's|python|python2|' scripts/MakeHeader.py + # Boost field buffer size - crashes when trying to draw very deep UTF-8 trees + # Test by nesting 30 shells + patch -N -i ../tree-crash.patch + ./configure \ --prefix=/usr \ --enable-unicode \ Added: tree-crash.patch =================================================================== --- tree-crash.patch (rev 0) +++ tree-crash.patch 2012-12-12 17:28:09 UTC (rev 173196) @@ -0,0 +1,13 @@ +Index: Process.c +=================================================================== +--- Process.c (revision 302) ++++ Process.c (working copy) +@@ -371,7 +371,7 @@ + } + + static void Process_writeField(Process* this, RichString* str, ProcessField field) { +- char buffer[128]; buffer[127] = '\0'; ++ char buffer[256]; buffer[255] = '\0'; + int attr = CRT_colors[DEFAULT_COLOR]; + int baseattr = CRT_colors[PROCESS_BASENAME]; + int n = sizeof(buffer) - 1;