diff options
author | midipix <writeonce@midipix.org> | 2024-12-30 06:07:28 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-12-30 06:17:43 +0000 |
commit | 9d68873391319e10e9bcd51566ec272e8c138781 (patch) | |
tree | 01a47d078ea22c9d094b63017e4c3f87fca1c908 /src/arbits | |
parent | e49b91d36c7c3281dcb407bc761ee01a51608fe4 (diff) | |
download | slibtool-9d68873391319e10e9bcd51566ec272e8c138781.tar.bz2 slibtool-9d68873391319e10e9bcd51566ec272e8c138781.tar.xz |
slbt_ar_store_archive(): guard against 32-bit time_t types.
Diffstat (limited to 'src/arbits')
-rw-r--r-- | src/arbits/slbt_archive_store.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |