summaryrefslogtreecommitdiff
blob: 09fcaef151eaaf0a0b52ba0bdc3d5c0b84db92ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From c49dc91df427f89ebcf9cdec556b8fc88cdfc3c1 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Tue, 17 Dec 2019 15:27:27 +0000
Subject: [PATCH 2/3] %td is for ptrdiff_t not for off_t.

---
 src/readelf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/readelf.c b/src/readelf.c
index afec31d1..8ac3b7d6 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -1349,8 +1349,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
 	name_off = xsh_offset;
 
 	if (fsize != SIZE_UNKNOWN && fsize < name_off) {
-		if (file_printf(ms, ", too large section header offset %td",
-		    name_off) == -1)
+		if (file_printf(ms, ", too large section header offset %jd",
+		    (intmax_t)name_off) == -1)
 			return -1;
 		return 0;
 	}
-- 
2.26.0