Skip to content

Commit a1c8027

Browse files
committed
Fix unportable coding in tarCreateHeader().
uid_t and gid_t might be wider than int on some platforms. Per buildfarm member brolga.
1 parent 8d6e2d4 commit a1c8027

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/port/tar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ tarCreateHeader(char *h, const char *filename, const char *linktarget,
8181
sprintf(&h[100], "%07o ", (int) mode);
8282

8383
/* User ID 8 */
84-
sprintf(&h[108], "%07o ", uid);
84+
sprintf(&h[108], "%07o ", (int) uid);
8585

8686
/* Group 8 */
87-
sprintf(&h[116], "%07o ", gid);
87+
sprintf(&h[116], "%07o ", (int) gid);
8888

8989
/* File size 12 - 11 digits, 1 space; use print_val for 64 bit support */
9090
if (linktarget != NULL || S_ISDIR(mode))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy