Skip to content

Fix isc_time_add() overflow

Ondřej Surý requested to merge ondrej/fix-isc_time_add-overflow into main

The isc_time_add() could overflow when t.seconds + i.seconds == UINT_MAX and t.nanoseconds + i.nanoseconds >= NS_PER_S. Fix the overflow in isc_time_add(), and simplify the ISC_R_RANGE checks both in isc_time_add() and isc_time_sub().

Edited by Ondřej Surý

Merge request reports