ports/148858: [PATCH] security/chaosreader: fix "devision by zero" error

Artem Naluzhnyy tut at nhamon.com.ua
Fri Jul 23 08:50:03 UTC 2010


>Number:         148858
>Category:       ports
>Synopsis:       [PATCH] security/chaosreader: fix "devision by zero" error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 23 08:50:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Artem Naluzhnyy
>Release:        
>Organization:
>Environment:
>Description:
See also http://sourceforge.net/tracker/?func=detail&aid=2210488&group_id=107384&atid=647489
>How-To-Repeat:

>Fix:
diff -ruN chaosreader.bak/Makefile chaosreader/Makefile
--- chaosreader.bak/Makefile	2009-09-03 02:59:45.000000000 +0300
+++ chaosreader/Makefile	2010-07-23 11:38:48.000000000 +0300
@@ -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 at utdallas.edu
 COMMENT=	A tool to extract data from tcpdump logs
diff -ruN chaosreader.bak/files/patch-chaosreader chaosreader/files/patch-chaosreader
--- chaosreader.bak/files/patch-chaosreader	1970-01-01 02:00:00.000000000 +0200
+++ chaosreader/files/patch-chaosreader	2010-07-23 11:22:10.000000000 +0300
@@ -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;


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list