From cf4f13f6830703eeec485c88a26f0d88dd473939 Mon Sep 17 00:00:00 2001 From: Rabinarayan Panigrahi Date: Mon, 1 Sep 2025 11:51:09 +0530 Subject: [PATCH] smbd: Fixing CID 1509052 for time_t in DEBUG statement 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 Reviewed-by: Volker Lendecke Reviewed-by: Douglas Bagnall Reviewed-by: Vinit Agnihotri Reviewed-by: Anoop C S Reviewed-by: Guenther Deschner Autobuild-User(master): Anoop C S Autobuild-Date(master): Tue Sep 16 17:45:30 UTC 2025 on atb-devel-224 --- source3/smbd/smb2_trans2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index deb371beaba..d4ef3bb1c1f 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -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; -- 2.47.3