]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nmbd: Fixing CID 1508948 for time_t in DEBUG statement
authorRabinarayan Panigrahi <rapanigr@redhat.com>
Thu, 4 Sep 2025 10:21:18 +0000 (15:51 +0530)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 10 Sep 2025 09:38:30 +0000 (09:38 +0000)
Fix: typecast changing from (int)namerec->data.death_time  to
(intmax_t)namerec->data.death_time as intmax_t can hold epoch seconds
after 2038 year

Signed-off-by: Rabinarayan Panigrahi <rapanigr@redhat.com>
Reviewed-by: Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/nmbd/nmbd_winsserver.c

index 4d4f19fef8bed8da76f45e78f09b51fdc70e5a22..bbe224e904e299c54e18073c1226edb08cc228d4 100644 (file)
@@ -422,8 +422,8 @@ static void update_wins_flag(struct name_record *namerec, int flags)
        /* and add the given bits */
        namerec->data.wins_flags|=flags;
 
-       DEBUG(8,("update_wins_flag: nbflags: 0x%x, ttl: %d, flags: 0x%x, winsflags: 0x%x\n", 
-                namerec->data.nb_flags, (int)namerec->data.death_time, flags, namerec->data.wins_flags));
+       DEBUG(8,("update_wins_flag: nbflags: 0x%x, ttl: %jd, flags: 0x%x, winsflags: 0x%x\n",
+                namerec->data.nb_flags, (intmax_t)namerec->data.death_time, flags, namerec->data.wins_flags));
 }
 
 /****************************************************************************