[arch-commits] Commit in htop/trunk (0001-Fix-buffer-reuse.patch PKGBUILD)
Dave Reisner
dreisner at archlinux.org
Tue Feb 16 12:31:02 UTC 2016
Date: Tuesday, February 16, 2016 @ 13:31:02
Author: dreisner
Revision: 259566
upgpkg: htop 2.0.0-2
- fix crash on startup with certain htoprc (FS#48149)
Added:
htop/trunk/0001-Fix-buffer-reuse.patch
Modified:
htop/trunk/PKGBUILD
-----------------------------+
0001-Fix-buffer-reuse.patch | 25 +++++++++++++++++++++++++
PKGBUILD | 16 ++++++++++++----
2 files changed, 37 insertions(+), 4 deletions(-)
Added: 0001-Fix-buffer-reuse.patch
===================================================================
--- 0001-Fix-buffer-reuse.patch (rev 0)
+++ 0001-Fix-buffer-reuse.patch 2016-02-16 12:31:02 UTC (rev 259566)
@@ -0,0 +1,25 @@
+From 0b70439316b4e4608c0916317ded7e6e56982de6 Mon Sep 17 00:00:00 2001
+From: Hisham <hisham at gobolinux.org>
+Date: Sat, 13 Feb 2016 02:18:28 -0200
+Subject: [PATCH] Fix buffer reuse.
+
+---
+ linux/LinuxProcessList.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
+index 591210e..ec643ab 100644
+--- a/linux/LinuxProcessList.c
++++ b/linux/LinuxProcessList.c
+@@ -446,7 +446,7 @@ static void LinuxProcessList_readOomData(LinuxProcess* process, const char* dirn
+ }
+
+ static void setCommand(Process* process, const char* command, int len) {
+- if (process->comm && process->commLen <= len) {
++ if (process->comm && process->commLen >= len) {
+ strncpy(process->comm, command, len + 1);
+ } else {
+ free(process->comm);
+--
+2.7.1
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-02-16 12:17:32 UTC (rev 259565)
+++ PKGBUILD 2016-02-16 12:31:02 UTC (rev 259566)
@@ -5,19 +5,27 @@
pkgname=htop
pkgver=2.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="Interactive process viewer"
arch=('i686' 'x86_64')
url="http://hisham.hm/htop/"
license=('GPL')
depends=('ncurses')
-makedepends=('python2')
+makedepends=('python')
optdepends=('lsof: show files opened by a process'
'strace: attach to a running process')
options=('!emptydirs')
-source=("http://hisham.hm/$pkgname/releases/$pkgver/$pkgname-$pkgver.tar.gz")
-md5sums=('06f76c7d644ce8ae611c9feb10439a30')
+source=("http://hisham.hm/$pkgname/releases/$pkgver/$pkgname-$pkgver.tar.gz"
+ "0001-Fix-buffer-reuse.patch")
+md5sums=('06f76c7d644ce8ae611c9feb10439a30'
+ '487c286d714139dca6f27bf5f79a0e1f')
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -Np1 <../0001-Fix-buffer-reuse.patch
+}
+
build() {
cd "$pkgname-$pkgver"
More information about the arch-commits
mailing list