diff options
Diffstat (limited to 'src/basic')
-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 fd86f1d449..4ced1bc6a1 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -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; |