ports/66936: [maintainer] fix signed int problem in display

Dmitry Morozovsky marck at rinet.ru
Thu May 20 12:20:19 UTC 2004


>Number:         66936
>Category:       ports
>Synopsis:       [maintainer] fix signed int problem in display
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 20 05:20:13 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Morozovsky
>Release:        FreeBSD 4-STABLE i386
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
System: FreeBSD 4-STABLE 


>Description:

When displaying very active flows it is possible to overflow bytecount.

Reported by Gleb Smirnoff <glebius <at> sell <dot> sick <dot> ru>

>How-To-Repeat:

>Fix:

(Two new patches ar shar'ed)

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/ehnt/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	12 Mar 2004 09:17:11 -0000	1.10
+++ Makefile	20 May 2004 12:08:30 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	ehnt
 PORTVERSION=	0.3
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	net-mgmt
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	files/patch-ehnt.h
#	files/patch-ehnt__display.c
#
echo x - files/patch-ehnt.h
sed 's/^X//' >files/patch-ehnt.h << 'END-of-files/patch-ehnt.h'
X
X$FreeBSD$
X
X--- ehnt.h.orig	Thu Oct  4 22:18:29 2001
X+++ ehnt.h	Thu May 20 16:07:24 2004
X@@ -93,7 +93,7 @@
X int ProcessFlow(struct flow_ver5_rec *, struct in_addr *, struct ehnt_struct *);
X int Init_ASN_Lookups(void);
X char * ASN_Lookup(int);
X-char * prettybytes(int);
X+char * prettybytes(unsigned);
X void DisplayReport(time_t, struct ehnt_data *);
X 
X /* these EM_ defines are for the mode config variable */
END-of-files/patch-ehnt.h
echo x - files/patch-ehnt__display.c
sed 's/^X//' >files/patch-ehnt__display.c << 'END-of-files/patch-ehnt__display.c'
X
X$FreeBSD$
X
X--- ehnt_display.c.orig	Thu Oct  4 22:18:29 2001
X+++ ehnt_display.c	Thu May 20 16:06:07 2004
X@@ -246,7 +246,7 @@
X 
X static char str[100];
X 
X-char * prettybytes(int bytes) {
X+char * prettybytes(unsigned bytes) {
X   
X   if (bytes < 1024) sprintf(str,"%4d", bytes);
X   else if (bytes < (1024*1024)) sprintf(str,"%4dK",(bytes/1024));
END-of-files/patch-ehnt__display.c
exit

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



More information about the freebsd-ports-bugs mailing list