net-analyzer/dosdetector: Drop bzero calls with wrong size argument since calloc...
authorJeroen Roovers <jer@gentoo.org>
Sun, 24 Jan 2016 09:29:26 +0000 (10:29 +0100)
committerJeroen Roovers <jer@gentoo.org>
Sun, 24 Jan 2016 09:29:43 +0000 (10:29 +0100)
Package-Manager: portage-2.2.27

net-analyzer/dosdetector/dosdetector-20060621-r1.ebuild [new file with mode: 0644]
net-analyzer/dosdetector/files/dosdetector-20060621-sizeof.patch [new file with mode: 0644]

diff --git a/net-analyzer/dosdetector/dosdetector-20060621-r1.ebuild b/net-analyzer/dosdetector/dosdetector-20060621-r1.ebuild
new file mode 100644 (file)
index 0000000..ba113ec
--- /dev/null
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Tool to analyze and detect suspicious traffic from IP and alert about it"
+HOMEPAGE="http://dark-zone.eu/resources/unix/dosdetector/"
+SRC_URI="http://dark-zone.eu/resources/unix/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       epatch \
+               "${FILESDIR}"/${P}-isdigit.patch \
+               "${FILESDIR}"/${P}-sizeof.patch
+}
diff --git a/net-analyzer/dosdetector/files/dosdetector-20060621-sizeof.patch b/net-analyzer/dosdetector/files/dosdetector-20060621-sizeof.patch
new file mode 100644 (file)
index 0000000..aea9cfb
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/main.c
++++ b/src/main.c
+@@ -306,8 +306,6 @@
+     hosts = calloc(2, sizeof(struct host));
+     rules = calloc(1, sizeof(struct rule));
+     rules_num = 0;
+-    bzero(hosts, sizeof(hosts));
+-    bzero(rules, sizeof(rules));
+     /* Init rules table */
+     if (init_rules(opt.rules) != 0) {