From d4fba56212230a9cf0ad034d6ba2069638c9ed71 Mon Sep 17 00:00:00 2001 From: Brandon Bergren Date: Sat, 31 Oct 2020 22:14:37 +0000 Subject: [PATCH] Fix 32-bit build after r367209 Fix build on systems with a 32-bit size_t. Since it's being passed as a pointer, a 64-bit write to it will overflow. MFC with: r367209 --- contrib/elftoolchain/readelf/readelf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index d90599602adb..88d87f96bb72 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -6909,8 +6909,8 @@ get_symbol_value(struct readelf *re, int symtab, int i) * Returns true if sucessful, false otherwise. */ static bool decompress_section(struct section *s, - unsigned char *compressed_data_buffer, uint64_t compressed_size, - unsigned char **ret_buf, uint64_t *ret_sz) + unsigned char *compressed_data_buffer, size_t compressed_size, + unsigned char **ret_buf, size_t *ret_sz) { GElf_Shdr sh;