net-analyzer/ntopng: fixed bug 634104
authorSlawomir Lis <slis@gentoo.org>
Thu, 7 Dec 2017 06:44:02 +0000 (07:44 +0100)
committerSlawomir Lis <slis@gentoo.org>
Thu, 7 Dec 2017 06:44:02 +0000 (07:44 +0100)
Applying patch sent by zoltan@sinustrom.info
This patch is solving problem with pointer comparison

Reported by: fkrogh@mathalacarte.com

Package-Manager: Portage-2.3.16, Repoman-2.3.6

net-analyzer/ntopng/files/pointer-cmp.patch [new file with mode: 0644]
net-analyzer/ntopng/ntopng-3.0-r1.ebuild

diff --git a/net-analyzer/ntopng/files/pointer-cmp.patch b/net-analyzer/ntopng/files/pointer-cmp.patch
new file mode 100644 (file)
index 0000000..11fb47c
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Naur ntopng-3.0-orig/src/AddressResolution.cpp ntopng-3.0/src/AddressResolution.cpp
+--- ntopng-3.0-orig/src/AddressResolution.cpp  2017-06-01 00:18:57.000000000 -0700
++++ ntopng-3.0/src/AddressResolution.cpp       2017-11-27 23:13:50.158163187 -0800
+@@ -52,7 +52,7 @@
+   u_int numeric_ip_len;
+   snprintf(query, sizeof(query), "%s", _numeric_ip);
+-  if((at = strchr(query, '@')) != '\0') at[0] = '\0';
++  if((at = strchr(query, '@')) != NULL) at[0] = '\0';
+   numeric_ip = query;
+   numeric_ip_len = strlen(numeric_ip)-1;
index 3fe29fa78180021e6972c3f74d3a2d9a6ba389b9..3470ef4dea27e646e5b50c8cc898558ac9e91115 100644 (file)
@@ -30,6 +30,7 @@ RDEPEND="${DEPEND}
 PATCHES=(
        "${FILESDIR}"/${P}-gentoo.patch
        "${FILESDIR}"/${P}-mysqltool.patch
+       "${FILESDIR}"/${P}-pointer-cmp.patch
 )
 
 src_prepare() {