svn commit: trunk/busybox/networking/udhcp

vda at busybox.net vda at busybox.net
Fri May 9 11:55:58 UTC 2008


Author: vda
Date: 2008-05-09 04:55:58 -0700 (Fri, 09 May 2008)
New Revision: 21958

Log:
udhcp: protect agianst timer overflowing 32-bit counter

function                                             old     new   delta
arpping                                              398     387     -11



Modified:
   trunk/busybox/networking/udhcp/arpping.c


Changeset:
Modified: trunk/busybox/networking/udhcp/arpping.c
===================================================================
--- trunk/busybox/networking/udhcp/arpping.c	2008-05-09 11:36:17 UTC (rev 21957)
+++ trunk/busybox/networking/udhcp/arpping.c	2008-05-09 11:55:58 UTC (rev 21958)
@@ -106,7 +106,7 @@
 				break;
 			}
 		}
-		timeout_ms -= (monotonic_us() - prevTime) / 1000;
+		timeout_ms -= ((unsigned)monotonic_us() - prevTime) / 1000;
 	} while (timeout_ms > 0);
 
  ret:




More information about the busybox-cvs mailing list