summaryrefslogtreecommitdiff
path: root/testing/iputils/iputils-20101006-ping-integer-overflow.patch
blob: 720e5e888f9aaefe5e2c375ccbd65872e67063d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- iputils-s20101006/ping_common.c	2010-10-06 13:59:20.000000000 +0200
+++ iputils-s20101006-patched/ping_common.c	2012-03-09 16:42:46.878151032 +0100
@@ -590,7 +590,7 @@
 
 			/* If we are here, recvmsg() is unable to wait for
 			 * required timeout. */
-			if (1000*next <= 1000000/(int)HZ) {
+			if (((uint64_t)1000*next) <= (uint64_t)1000000/(int)HZ) {
 				/* Very short timeout... So, if we wait for
 				 * something, we sleep for MININTERVAL.
 				 * Otherwise, spin! */