mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
time-util: Fix overflow check introduce in commit f977849 (#5216)
This commit is contained in:
parent
5c1d991f40
commit
d201d90838
@ -212,7 +212,7 @@ struct timespec *timespec_store(struct timespec *ts, usec_t u) {
|
||||
assert(ts);
|
||||
|
||||
if (u == USEC_INFINITY ||
|
||||
u / USEC_INFINITY >= TIME_T_MAX) {
|
||||
u / USEC_PER_SEC >= TIME_T_MAX) {
|
||||
ts->tv_sec = (time_t) -1;
|
||||
ts->tv_nsec = (long) -1;
|
||||
return ts;
|
||||
|
Loading…
x
Reference in New Issue
Block a user