mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-25 10:22:59 +02:00
iptraf-ng: Fix FPE.
http://lists.ipfire.org/pipermail/development/2013-August/000420.html https://bugzilla.ipfire.org/show_bug.cgi?id=10408
This commit is contained in:
12
src/patches/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch
Normal file
12
src/patches/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -Nur iptraf-ng-1.1.4-orig/src/tcptable.c iptraf-ng-1.1.4/src/tcptable.c
|
||||
--- iptraf-ng-1.1.4-orig/src/tcptable.c 2013-07-23 15:06:11.000000000 +0200
|
||||
+++ iptraf-ng-1.1.4/src/tcptable.c 2013-08-28 19:10:33.000000000 +0200
|
||||
@@ -444,6 +444,8 @@
|
||||
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));
|
||||
Reference in New Issue
Block a user