aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2024-01-02 11:27:50 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-02 11:27:50 -0500
commitb49fe5088ca8f1fa0191a85e933ec213928449bc (patch)
tree2210cfddaf258951002d665e27b4caab814b9d84
parentupdate copyright headers (diff)
downloadpax-utils-b49fe5088ca8f1fa0191a85e933ec213928449bc.tar.gz
pax-utils-b49fe5088ca8f1fa0191a85e933ec213928449bc.tar.bz2
pax-utils-b49fe5088ca8f1fa0191a85e933ec213928449bc.zip
dumpelf: use explicit 64-bit to display off_t
There's no guarantee that %j (uintmax_t) is large enough to handle off_t. Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--dumpelf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dumpelf.c b/dumpelf.c
index de9a563..1a469ea 100644
--- a/dumpelf.c
+++ b/dumpelf.c
@@ -40,9 +40,9 @@ static void dumpelf(const elfobj *elf, size_t file_cnt)
"\n"
"/*\n"
" * ELF dump of '%s'\n"
- " * %ji (0x%jX) bytes\n"
+ " * %" PRIi64 " (0x%" PRIX64 ") bytes\n"
" */\n\n",
- elf->filename, elf->len, elf->len);
+ elf->filename, (int64_t)elf->len, (uint64_t)elf->len);
/* setup the struct to namespace this elf */
#define MAKE_STRUCT(B) \