]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tevent: Fix 1649525 Use of 32-bit time_t
authorVolker Lendecke <vl@samba.org>
Fri, 20 Jun 2025 07:27:23 +0000 (09:27 +0200)
committerAnoop C S <anoopcs@samba.org>
Fri, 20 Jun 2025 10:14:37 +0000 (10:14 +0000)
Coverity ID "1649525 Use of 32-bit time_t" is correct. What Coverity
does not see is that this routine is the only one assigning to
ev->wait_timeout. Make Coverity happy with the MIN().

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
lib/tevent/tevent.c

index c9f57fece940a83dca5d93e60885c56d685c07c3..12e1f407bc64b265cdb1ecc4366abe0e25b030f4 100644 (file)
@@ -611,7 +611,7 @@ uint32_t tevent_context_set_wait_timeout(struct tevent_context *ev,
        ev->wait_timeout = tevent_timeval_set((time_t)secs,
                                              (secs == 0) ?  INT32_MAX: 0);
 
-       return ret;
+       return MIN(ret, INT32_MAX);
 }
 
 /*