summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-03 10:51:34 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-03 10:51:34 +0200
commitd443bc79b599eb6e6054a0feb4d0d0654b2c683f (patch)
tree26bf50619a2114a4dad8726ea8bbe18c797d0ea7
parent0576557fa9e53b0b349aba0d1271a69356fe5f58 (diff)
Fix tar header error reporting on 32 bit systems
If an extension header is rejected because its too big, the error path would print the size as size_t, altough it is an uint64_t. On 64 bit systems, this works because size_t is a 64 bit unsigned integer, on 32 bit systems, not so much. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--lib/tar/read_header.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/tar/read_header.c b/lib/tar/read_header.c
index eaea6db..63de699 100644
--- a/lib/tar/read_header.c
+++ b/lib/tar/read_header.c
@@ -448,16 +448,16 @@ out_eof:
clear_header(out);
return 1;
fail_slink_len:
- fprintf(stderr, "rejecting GNU symlink header with size %zu\n",
- pax_size);
+ fprintf(stderr, "rejecting GNU symlink header with size %lu\n",
+ (unsigned long)pax_size);
goto fail;
fail_path_len:
- fprintf(stderr, "rejecting GNU long path header with size %zu\n",
- pax_size);
+ fprintf(stderr, "rejecting GNU long path header with size %lu\n",
+ (unsigned long)pax_size);
goto fail;
fail_pax_len:
- fprintf(stderr, "rejecting PAX header with size %zu\n",
- pax_size);
+ fprintf(stderr, "rejecting PAX header with size %lu\n",
+ (unsigned long)pax_size);
goto fail;
fail_magic:
fputs("input is not a ustar tar archive!\n", stderr);