aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace/elf.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-01-18 17:13:59 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-01-18 17:13:59 +0000
commit8b248c17bd9999eb3adb585b0789595bada43e8c (patch)
tree763e0966d741405f3d063a4c83449045813900b5 /libbacktrace/elf.c
parent89ce81fbe13dc554d489d9f00f92f85164b185d6 (diff)
downloadgcc-8b248c17bd9999eb3adb585b0789595bada43e8c.zip
gcc-8b248c17bd9999eb3adb585b0789595bada43e8c.tar.gz
gcc-8b248c17bd9999eb3adb585b0789595bada43e8c.tar.bz2
re PR libbacktrace/88890 (libbacktrace on 32-bit system with _FILE_OFFSET_BITS == 64)
PR libbacktrace/88890 * mmapio.c (backtrace_get_view): Change size parameter to uint64_t. Check that value fits in size_t. * read.c (backtrace_get_view): Likewise. * internal.h (backtrace_get_view): Update declaration. * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view. From-SVN: r268082
Diffstat (limited to 'libbacktrace/elf.c')
-rw-r--r--libbacktrace/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c
index 87e7b0d..01cf6f9 100644
--- a/libbacktrace/elf.c
+++ b/libbacktrace/elf.c
@@ -2813,7 +2813,7 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor,
shstr_size = shstrhdr->sh_size;
shstr_off = shstrhdr->sh_offset;
- if (!backtrace_get_view (state, descriptor, shstr_off, shstr_size,
+ if (!backtrace_get_view (state, descriptor, shstr_off, shstrhdr->sh_size,
error_callback, data, &names_view))
goto fail;
names_view_valid = 1;