Browse Source

Cherry-pick "%td is for ptrdiff_t not for off_t" from upstream

Christoph Biedl 4 years ago
parent
commit
8a5900802d

+ 18 - 0
debian/patches/cherry-pick.FILE5_38-1-gd955cefc.-td-is-for-ptrdiff-t-not-for-off-t.patch

@@ -0,0 +1,18 @@
+Subject: %td is for ptrdiff_t not for off_t
+Origin: FILE5_38-1-gd955cefc <https://github.com/file/file/commit/FILE5_38-1-gd955cefc>
+Upstream-Author: Christos Zoulas <christos@zoulas.com>
+Date: Tue Dec 17 15:27:27 2019 +0000
+
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -1349,8 +1349,8 @@
+ 	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;
+ 	}

+ 1 - 0
debian/patches/series

@@ -1,4 +1,5 @@
 # cherry-picked commits. Keep in upstream's chronological order
+cherry-pick.FILE5_38-1-gd955cefc.-td-is-for-ptrdiff-t-not-for-off-t.patch
 
 # patches that should go upstream