mirror of
https://github.com/systemd/systemd.git
synced 2025-01-07 21:18:41 +03:00
time-util: add overflow checking to monotonic timestamp specifications
This commit is contained in:
parent
74c5b33b0a
commit
315782db14
@ -844,6 +844,8 @@ from_tm:
|
||||
return -EINVAL;
|
||||
|
||||
finish:
|
||||
if (ret + plus < ret) /* overflow? */
|
||||
return -EINVAL;
|
||||
ret += plus;
|
||||
if (ret > USEC_TIMESTAMP_FORMATTABLE_MAX)
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user