summaryrefslogtreecommitdiff
path: root/src/libelogind/sd-daemon/sd-daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libelogind/sd-daemon/sd-daemon.c')
-rw-r--r--src/libelogind/sd-daemon/sd-daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libelogind/sd-daemon/sd-daemon.c b/src/libelogind/sd-daemon/sd-daemon.c
index 3ea9764c4..e47da68a6 100644
--- a/src/libelogind/sd-daemon/sd-daemon.c
+++ b/src/libelogind/sd-daemon/sd-daemon.c
@@ -595,7 +595,7 @@ _public_ int sd_watchdog_enabled(int unset_environment, uint64_t *usec) {
r = safe_atou64(s, &u);
if (r < 0)
goto finish;
- if (u <= 0) {
+ if (u <= 0 || u >= USEC_INFINITY) {
r = -EINVAL;
goto finish;
}