]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Limit timeout for end of slew to avoid overflow
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 21 Jan 2010 16:11:17 +0000 (17:11 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 25 Jan 2010 14:50:45 +0000 (15:50 +0100)
sys_linux.c

index 4821121e1fc02515aa20d9cac7b135b0e1b24505..67ec418a8c136d990dcec6346617c216efaa6982 100644 (file)
@@ -353,7 +353,9 @@ initiate_slew(void)
     fast_slewing = 1;
     slew_start_tv = T0a;
 
-    /* Set up timeout for end of slew */
+    /* Set up timeout for end of slew, limit to one week */
+    if (dseconds > 3600 * 24 * 7)
+      dseconds = 3600 * 24 * 7;
     UTI_AddDoubleToTimeval(&T0a, dseconds, &end_of_slew);
 
     slew_timeout_id = SCH_AddTimeout(&end_of_slew, handle_end_of_slew, NULL);