diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-02 18:35:00 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-17 17:58:36 +0200 |
commit | a61ff8a1eea921800d6225ff137b24e0a0fb60e1 (patch) | |
tree | 025d480633ed2bb601e464ef6cf93a17d2478cb2 /src | |
parent | f082899f180431f04553e4ee3b0968020ef59188 (diff) |
time-util: add overflow checking to monotonic timestamp specifications
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/time-util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/time-util.c b/src/basic/time-util.c index 265f5995a..6a76b6551 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -857,6 +857,8 @@ from_tm: return -EINVAL; finish: + if (ret + plus < ret) /* overflow? */ + return -EINVAL; ret += plus; if (ret > USEC_TIMESTAMP_FORMATTABLE_MAX) return -EINVAL; |