openbsd-ports/net/bwm-ng/patches/patch-src_output_c
niallo 719dcd66f7 Import net/bwm-ng
DESCR:

Bandwidth Monitor NG is a small and simple console-based live
bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others.

Short list of features:

* supports /proc/net/dev, netstat, getifaddr, sysctl, kstat and
        libstatgrab
* unlimited number of interfaces supported
* interfaces are added or removed dynamically from list
* white-/blacklist of interfaces
* output of KB/s, Kb/s, packets, errors, average, max
        and total sum
* output in curses, plain console, CSV or HTML
* configfile

From: Genadijus Paleckis <rwx@openbsd.lt>

ok alek@
2005-06-21 21:52:46 +00:00

16 lines
543 B
Plaintext

$OpenBSD: patch-src_output_c,v 1.1.1.1 2005/06/21 21:52:46 niallo Exp $
--- src/output.c.orig Mon Jun 20 19:16:52 2005
+++ src/output.c Mon Jun 20 19:17:00 2005
@@ -209,9 +209,9 @@ char *values2str(char mode,t_iface_speed
|| output_type==MAX_OUT || output_type==AVG_OUT
#endif
)
- strcpy(speed,"/s");
+ strlcpy(speed,"/s",2);
else
- strcpy(speed," ");
+ strlcpy(speed," ",2);
if (
#if !NETSTAT_BSD_BYTES && !NETSTAT_NETBSD && NETSTAT
input_method==NETSTAT_IN ||