You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-tcplog_flow...

12 lines
330 B

--- a/src/tcptable.c
+++ b/src/tcptable.c
@@ -437,6 +437,8 @@ static char *tcplog_flowrate_msg(struct tcptableent *entry, char *buf,
size_t bufsize)
{
time_t interval = time(NULL) - entry->conn_starttime;
+ if (interval < 1)
+ interval = 1;
char rbuf[64];
rate_print(entry->bcount / interval, rbuf, sizeof(rbuf));