summaryrefslogtreecommitdiff
path: root/tc/tc_core.h
diff options
context:
space:
mode:
authorAndreas Henriksson <andreas@fatal.se>2007-10-12 10:56:46 +0200
committerStephen Hemminger <shemminger@linux-foundation.org>2007-10-12 14:56:35 -0700
commit447598449817fcaea26016d9102d703c4d16bd9c (patch)
treeb7b5cff7b170a87524ea5e201971b637032620d7 /tc/tc_core.h
parentf7c3cefc9c7add8052be1f294538e4669f58a577 (diff)
downloadiproute2-447598449817fcaea26016d9102d703c4d16bd9c.tar.gz
Fix overflow in time2tick / tick2time.
The helper functions gets passed an unsigned int, which gets cast to long and overflows. See http://bugs.debian.org/175462 Signed-off-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Diffstat (limited to 'tc/tc_core.h')
-rw-r--r--tc/tc_core.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tc/tc_core.h b/tc/tc_core.h
index a139da6f..b2a16bc3 100644
--- a/tc/tc_core.h
+++ b/tc/tc_core.h
@@ -7,8 +7,8 @@
#define TIME_UNITS_PER_SEC 1000000
int tc_core_time2big(long time);
-long tc_core_time2tick(long time);
-long tc_core_tick2time(long tick);
+unsigned tc_core_time2tick(unsigned time);
+unsigned tc_core_tick2time(unsigned tick);
long tc_core_time2ktime(long time);
long tc_core_ktime2time(long ktime);
unsigned tc_calc_xmittime(unsigned rate, unsigned size);