diff options
author | midipix <writeonce@midipix.org> | 2024-12-30 05:50:10 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-12-30 06:17:43 +0000 |
commit | 5f293f0453aa6b03e06cc56b0126024cec847e24 (patch) | |
tree | 045fdab3b7b4bdf105ff4175929d091c3d5aba39 /src/arbits | |
parent | 71d0639e72e21cd7020818891b1b23f01765ef08 (diff) | |
download | slibtool-5f293f0453aa6b03e06cc56b0126024cec847e24.tar.bz2 slibtool-5f293f0453aa6b03e06cc56b0126024cec847e24.tar.xz |
slbt_ar_merge_archives(), slbt_tmpfile(): guard against 32-bit time_t types.
Diffstat (limited to 'src/arbits')
-rw-r--r-- | src/arbits/slbt_archive_merge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arbits/slbt_archive_merge.c b/src/arbits/slbt_archive_merge.c index 5f29235..9068bf6 100644 --- a/src/arbits/slbt_archive_merge.c +++ b/src/arbits/slbt_archive_merge.c @@ -180,6 +180,7 @@ int slbt_ar_merge_archives( int64_t osymrefs; int64_t onamestrs; int64_t omemfixup; + int64_t atint; char * base; unsigned char * ubase; @@ -359,7 +360,7 @@ int slbt_ar_merge_archives( memcpy(arhdr,armap->ar_member_data,sizeof(*arhdr)+sarname); nwritten = armap->ar_file_header.ar_time_date_stamp - ? sprintf(arhdr->ar_time_date_stamp,PPRII64,time(0)) + ? sprintf(arhdr->ar_time_date_stamp,PPRII64,(atint = time(0))) : 0; if (nwritten < 0) @@ -401,7 +402,7 @@ int slbt_ar_merge_archives( memcpy(arhdr,arnames->ar_member_data,sizeof(*arhdr)); nwritten = arnames->ar_file_header.ar_time_date_stamp - ? sprintf(arhdr->ar_time_date_stamp,PPRII64,time(0)) + ? sprintf(arhdr->ar_time_date_stamp,PPRII64,(atint = time(0))) : 0; if (nwritten < 0) |