-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libc: Fix absolute_timespec_from_timespec overflow.
A legacy library has uncovered an overflow in this newly introduced function. absolute_timespec_from_timespec blindly adds a relative timespec to the current timespec, ignoring the possibility of tv_sec overflowing. This was produced by calling pthread_cond_timedwait_relative_np with a filled (to maximum values) timespec to create a faux 'infinite timeout'. This is fixed by clamping the value as high as we can determine is safe.
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters