Fix a division by zero bug.

Bump PORTREVISION

PR:		148858
Submitted by:	Artem Naluzhnyy <tut@nhamon.com.ua>
Approved by:	maintainer
This commit is contained in:
Tilman Keskinoz 2010-07-28 15:23:24 +00:00
parent c03a3248cd
commit 3fc67c541d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=258388
2 changed files with 17 additions and 0 deletions

View file

@ -7,10 +7,12 @@
PORTNAME= chaosreader PORTNAME= chaosreader
PORTVERSION= 0.94 PORTVERSION= 0.94
PORTREVISION= 1
CATEGORIES= security CATEGORIES= security
MASTER_SITES= SF MASTER_SITES= SF
DISTFILES= ${PORTNAME}${PORTVERSION} sshkeydata0.20 DISTFILES= ${PORTNAME}${PORTVERSION} sshkeydata0.20
EXTRACT_ONLY= EXTRACT_ONLY=
NO_WRKSUBDIR= yes
MAINTAINER= pauls@utdallas.edu MAINTAINER= pauls@utdallas.edu
COMMENT= A tool to extract data from tcpdump logs COMMENT= A tool to extract data from tcpdump logs

View file

@ -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;