From 9d68873391319e10e9bcd51566ec272e8c138781 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 30 Dec 2024 06:07:28 +0000 Subject: slbt_ar_store_archive(): guard against 32-bit time_t types. --- src/arbits/slbt_archive_store.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/arbits') diff --git a/src/arbits/slbt_archive_store.c b/src/arbits/slbt_archive_store.c index d09a3f0..7830784 100644 --- a/src/arbits/slbt_archive_store.c +++ b/src/arbits/slbt_archive_store.c @@ -41,6 +41,7 @@ int slbt_ar_store_archive( struct stat st; int fdat; int fdtmp; + int64_t tint; void * addr; char * mark; char * slash; @@ -74,6 +75,7 @@ int slbt_ar_store_archive( fdat = slbt_driver_fdcwd(dctx); addr = buf; + tint = time(0); mark = (slash = strrchr(buf,'/')) ? slash : buf; @@ -100,7 +102,7 @@ int slbt_ar_store_archive( ".pid.%d" ".tmp", st.st_ino, - time(0),addr, + tint,addr, getpid()); if (nbytes >= buflen) -- cgit v1.2.3