X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Flibelogind%2Fsd-daemon%2Fsd-daemon.c;h=e47da68a66f3cd6a0bcd82998292e15a14b6b8f2;hb=9e42188e79377946c9d5c197abfb58ad88d7baae;hp=3ea9764c45bd383ec24d9272ed9e3b8b61b5db4f;hpb=5e42721bc2e1734adbd966b0e0d89ce80834ca97;p=elogind.git 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; }