]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fixing CID 1509052 for time_t in DEBUG statement
authorRabinarayan Panigrahi <rapanigr@redhat.com>
Mon, 1 Sep 2025 06:21:09 +0000 (11:51 +0530)
committerAnoop C S <anoopcs@samba.org>
Tue, 16 Sep 2025 17:45:30 +0000 (17:45 +0000)
Fix: typecast changing from (unsigned)convert_timespec_to_time_t  to
(intmax_t)convert_timespec_to_time_t can hold epoch seconds
after 2038 year

Signed-off-by: Rabinarayan Panigrahi <rapanigr@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Sep 16 17:45:30 UTC 2025 on atb-devel-224

source3/smbd/smb2_trans2.c

index deb371beaba646d2736e5246d8dd98f50b2cd431..d4ef3bb1c1f04aa37f271e1f9cf70b0c81e4c11b 100644 (file)
@@ -2113,9 +2113,9 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)st.st_ex_dev, (u
                        }
                        SCVAL(pdata,l2_vol_cch,len);
                        data_len = l2_vol_szVolLabel + len;
-                       DEBUG(5,("smbd_do_qfsinfo : time = %x, namelen = %u, "
+                       DEBUG(5,("smbd_do_qfsinfo : time = %jx, namelen = %u, "
                                 "name = %s serial = 0x%04"PRIx32"\n",
-                                (unsigned)convert_timespec_to_time_t(st.st_ex_ctime),
+                                (intmax_t)convert_timespec_to_time_t(st.st_ex_ctime),
                                 (unsigned)len, vname, serial));
                        break;