aboutsummaryrefslogtreecommitdiff
path: root/security/chaosreader
diff options
context:
space:
mode:
authorTilman Keskinoz <arved@FreeBSD.org>2010-07-28 15:23:24 +0000
committerTilman Keskinoz <arved@FreeBSD.org>2010-07-28 15:23:24 +0000
commit3fc67c541da26f8dafb939fbd9c6073a1cb26c5a (patch)
treecac855061ffe9679e4f78075ad58cc30e525cea0 /security/chaosreader
parentc03a3248cd7dbe0d02adbbd4994b0195cbaa20d0 (diff)
downloadports-3fc67c541da26f8dafb939fbd9c6073a1cb26c5a.tar.gz
ports-3fc67c541da26f8dafb939fbd9c6073a1cb26c5a.zip
Fix a division by zero bug.
Bump PORTREVISION PR: 148858 Submitted by: Artem Naluzhnyy <tut@nhamon.com.ua> Approved by: maintainer
Notes
Notes: svn path=/head/; revision=258388
Diffstat (limited to 'security/chaosreader')
-rw-r--r--security/chaosreader/Makefile2
-rw-r--r--security/chaosreader/files/patch-chaosreader15
2 files changed, 17 insertions, 0 deletions
diff --git a/security/chaosreader/Makefile b/security/chaosreader/Makefile
index fda92da3ba0e..f43c17cd0e13 100644
--- a/security/chaosreader/Makefile
+++ b/security/chaosreader/Makefile
@@ -7,10 +7,12 @@
PORTNAME= chaosreader
PORTVERSION= 0.94
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= SF
DISTFILES= ${PORTNAME}${PORTVERSION} sshkeydata0.20
EXTRACT_ONLY=
+NO_WRKSUBDIR= yes
MAINTAINER= pauls@utdallas.edu
COMMENT= A tool to extract data from tcpdump logs
diff --git a/security/chaosreader/files/patch-chaosreader b/security/chaosreader/files/patch-chaosreader
new file mode 100644
index 000000000000..1f71c8bfe8b0
--- /dev/null
+++ b/security/chaosreader/files/patch-chaosreader
@@ -0,0 +1,15 @@
+--- chaosreader.orig 2010-07-23 11:18:46.000000000 +0300
++++ chaosreader 2010-07-23 11:21:34.000000000 +0300
+@@ -4028,7 +4028,11 @@
+ ### This causes the replay program to pause
+ print REPLAY "ms($timediff1);\n";
+ }
+- $speed = sprintf("%.2f",$bytes / (1024 * $duration));
++ if ( $duration > 0 ) {
++ $speed = sprintf("%.2f",$bytes / (1024 * $duration));
++ } else {
++ $speed = "unknown";
++ }
+ print REPLAY "print \"\n\n" .
+ "Summary: $duration2 seconds, $bytes bytes, $speed Kb/sec\\n\";";
+ close REPLAY;