aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/linuxdcpp
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2010-02-07 05:28:12 +0800
committerfjoe <fjoe@FreeBSD.org>2010-02-07 05:28:12 +0800
commitf8acbc6aad09f7711c17362c64b2579987b2044e (patch)
treecb8e56dbe96b3d892ae69040a8144b74b76f638b /net-p2p/linuxdcpp
parent342f01143d0337d2f8d4ad9f0797fa8a2783c3ba (diff)
downloadfreebsd-ports-gnome-f8acbc6aad09f7711c17362c64b2579987b2044e.tar.gz
freebsd-ports-gnome-f8acbc6aad09f7711c17362c64b2579987b2044e.tar.zst
freebsd-ports-gnome-f8acbc6aad09f7711c17362c64b2579987b2044e.zip
Fix huge memory leak (16M per every hashed file).
Approved by: MAINTAINER
Diffstat (limited to 'net-p2p/linuxdcpp')
-rw-r--r--net-p2p/linuxdcpp/Makefile2
-rw-r--r--net-p2p/linuxdcpp/files/patch-client-HashManager.cpp20
2 files changed, 21 insertions, 1 deletions
diff --git a/net-p2p/linuxdcpp/Makefile b/net-p2p/linuxdcpp/Makefile
index 6e3abe62ee28..00b85899fa32 100644
--- a/net-p2p/linuxdcpp/Makefile
+++ b/net-p2p/linuxdcpp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= linuxdcpp
PORTVERSION= 1.0.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-p2p
MASTER_SITES= ${MASTER_SITE_LOCAL} http://freebsd.nsu.ru/distfiles/
MASTER_SITE_SUBDIR= danfe
diff --git a/net-p2p/linuxdcpp/files/patch-client-HashManager.cpp b/net-p2p/linuxdcpp/files/patch-client-HashManager.cpp
new file mode 100644
index 000000000000..e62eb919fd48
--- /dev/null
+++ b/net-p2p/linuxdcpp/files/patch-client-HashManager.cpp
@@ -0,0 +1,20 @@
+--- client/HashManager.cpp.orig 2010-02-06 12:57:41.000000000 +0600
++++ client/HashManager.cpp 2010-02-06 12:58:04.000000000 +0600
+@@ -636,13 +636,13 @@
+ currentSize = max(static_cast<uint64_t>(currentSize - size_read), static_cast<uint64_t>(0));
+ }
+
+- if(size_left <= 0) {
+- break;
+- }
+-
+ munmap(buf, size_read);
+ pos += size_read;
+ size_left -= size_read;
++
++ if(size_left <= 0) {
++ break;
++ }
+ }
+ close(fd);
+ return true;