diff options
author | arved <arved@FreeBSD.org> | 2010-07-28 23:23:24 +0800 |
---|---|---|
committer | arved <arved@FreeBSD.org> | 2010-07-28 23:23:24 +0800 |
commit | ac8699b226da89b00a75d50aab78952b16ab3a90 (patch) | |
tree | 02356178c67092473e59dad2c46d56553a8d5bd8 | |
parent | 5eed5821860b3511d92f1a0f86d760597602b539 (diff) | |
download | freebsd-ports-gnome-ac8699b226da89b00a75d50aab78952b16ab3a90.tar.gz freebsd-ports-gnome-ac8699b226da89b00a75d50aab78952b16ab3a90.tar.zst freebsd-ports-gnome-ac8699b226da89b00a75d50aab78952b16ab3a90.zip |
Fix a division by zero bug.
Bump PORTREVISION
PR: 148858
Submitted by: Artem Naluzhnyy <tut@nhamon.com.ua>
Approved by: maintainer
-rw-r--r-- | security/chaosreader/Makefile | 2 | ||||
-rw-r--r-- | security/chaosreader/files/patch-chaosreader | 15 |
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; |