mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-31 00:53:23 +00:00
* src/arscan.c (ar_member_touch): [SV 54533] Stop \0 in archive headers
This commit is contained in:
parent
5d6508a475
commit
214865ed5c
1 changed files with 1 additions and 3 deletions
|
@ -904,14 +904,12 @@ ar_member_touch (const char *arname, const char *memname)
|
||||||
EINTRLOOP (r, fstat (fd, &statbuf));
|
EINTRLOOP (r, fstat (fd, &statbuf));
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto lose;
|
goto lose;
|
||||||
#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32)
|
|
||||||
/* Advance member's time to that time */
|
/* Advance member's time to that time */
|
||||||
|
#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32)
|
||||||
for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++)
|
for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++)
|
||||||
ar_hdr.ar_date[ui] = ' ';
|
ar_hdr.ar_date[ui] = ' ';
|
||||||
sprintf (TOCHAR (ar_hdr.ar_date), "%lu", (long unsigned) statbuf.st_mtime);
|
sprintf (TOCHAR (ar_hdr.ar_date), "%lu", (long unsigned) statbuf.st_mtime);
|
||||||
#ifdef AIAMAG
|
|
||||||
ar_hdr.ar_date[strlen (ar_hdr.ar_date)] = ' ';
|
ar_hdr.ar_date[strlen (ar_hdr.ar_date)] = ' ';
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
ar_hdr.ar_date = statbuf.st_mtime;
|
ar_hdr.ar_date = statbuf.st_mtime;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue