svn commit: r409564 - in head/deskutils/superkaramba: . files
Raphael Kubo da Costa
rakuco at FreeBSD.org
Thu Feb 25 22:26:42 UTC 2016
Author: rakuco
Date: Thu Feb 25 22:26:40 2016
New Revision: 409564
URL: https://svnweb.freebsd.org/changeset/ports/409564
Log:
Add a patch to avoid overflows when reading hw.physmem and vfs.bufspace.
Use longs instead of ints, otherwise we risk reporting negative values.
Submitted by: Axel Gonzalez <loox at e-shell.net>
Added:
head/deskutils/superkaramba/files/
head/deskutils/superkaramba/files/patch-src_sensors_mem.cpp (contents, props changed)
Modified:
head/deskutils/superkaramba/Makefile
Modified: head/deskutils/superkaramba/Makefile
==============================================================================
--- head/deskutils/superkaramba/Makefile Thu Feb 25 22:21:37 2016 (r409563)
+++ head/deskutils/superkaramba/Makefile Thu Feb 25 22:26:40 2016 (r409564)
@@ -2,6 +2,7 @@
PORTNAME= superkaramba
PORTVERSION= ${KDE4_VERSION}
+PORTREVISION= 1
CATEGORIES= deskutils kde
MASTER_SITES= KDE/${KDE4_BRANCH}/${PORTVERSION}/src
DIST_SUBDIR= KDE/${PORTVERSION}
Added: head/deskutils/superkaramba/files/patch-src_sensors_mem.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/deskutils/superkaramba/files/patch-src_sensors_mem.cpp Thu Feb 25 22:26:40 2016 (r409564)
@@ -0,0 +1,21 @@
+Use the right type to avoid overflows and negative values.
+--- src/sensors/mem.cpp.orig 2014-09-14 14:15:59 UTC
++++ src/sensors/mem.cpp
+@@ -97,7 +97,7 @@ void MemSensor::processExited(K3Process
+ int MemSensor::getMemTotal()
+ {
+ #if defined Q_OS_FREEBSD || defined(Q_OS_NETBSD) || defined(__DragonFly__)
+- static int mem = 0;
++ static long mem = 0;
+ size_t size = sizeof(mem);
+
+ sysctlbyname("hw.physmem", &mem, &size, NULL, 0);
+@@ -136,7 +136,7 @@ int MemSensor::getMemFree()
+ int MemSensor::getBuffers()
+ {
+ #if defined(Q_OS_FREEBSD) || defined(__DragonFly__)
+- static int mem = 0;
++ static long mem = 0;
+ size_t size = sizeof(mem);
+
+ sysctlbyname("vfs.bufspace", &mem, &size, NULL, 0);
More information about the svn-ports-head
mailing list