cherry-pick.FILE5_38-1-gd955cefc.-td-is-for-ptrdiff-t-not-for-off-t.patch 583 B

123456789101112131415161718
  1. Subject: %td is for ptrdiff_t not for off_t
  2. Origin: FILE5_38-1-gd955cefc <https://github.com/file/file/commit/FILE5_38-1-gd955cefc>
  3. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Tue Dec 17 15:27:27 2019 +0000
  5. --- a/src/readelf.c
  6. +++ b/src/readelf.c
  7. @@ -1349,8 +1349,8 @@
  8. name_off = xsh_offset;
  9. if (fsize != SIZE_UNKNOWN && fsize < name_off) {
  10. - if (file_printf(ms, ", too large section header offset %td",
  11. - name_off) == -1)
  12. + if (file_printf(ms, ", too large section header offset %jd",
  13. + (intmax_t)name_off) == -1)
  14. return -1;
  15. return 0;
  16. }