719dcd66f7
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@
13 lines
732 B
Plaintext
13 lines
732 B
Plaintext
$OpenBSD: patch-src_retrieve_c,v 1.1.1.1 2005/06/21 21:52:46 niallo Exp $
|
|
--- src/retrieve.c.orig Mon Jun 20 19:12:06 2005
|
|
+++ src/retrieve.c Mon Jun 20 19:13:47 2005
|
|
@@ -306,7 +306,7 @@ void get_iface_stats_netstat (char verbo
|
|
#if NETSTAT_BSD || NETSTAT_BSD_BYTES || NETSTAT_SOLARIS || NETSTAT_NETBSD
|
|
/* check if we have a new iface or if its only a second line of the same one */
|
|
if (!strcmp(last_name,name)) continue; /* skip this line */
|
|
- strcpy(last_name,name);
|
|
+ strlcpy(last_name,name,MAX_LINE_BUFFER - 1);
|
|
#endif
|
|
/* init new interfaces and add fetched data to old or new one */
|
|
hidden_if = process_if_data (hidden_if, tmp_if_stats, &stats, name, current_if_num, verbose,
|