mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 02:05:06 -05:00
Limit timeout for end of slew to avoid overflow
This commit is contained in:
@@ -353,7 +353,9 @@ initiate_slew(void)
|
|||||||
fast_slewing = 1;
|
fast_slewing = 1;
|
||||||
slew_start_tv = T0a;
|
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);
|
UTI_AddDoubleToTimeval(&T0a, dseconds, &end_of_slew);
|
||||||
|
|
||||||
slew_timeout_id = SCH_AddTimeout(&end_of_slew, handle_end_of_slew, NULL);
|
slew_timeout_id = SCH_AddTimeout(&end_of_slew, handle_end_of_slew, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user