Skip to content

Commit

Permalink
also safely cast the access to section header string table.
Browse files Browse the repository at this point in the history
  • Loading branch information
supervacuus committed Oct 28, 2024
1 parent d340a43 commit f3ef6ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modulefinder/sentry_modulefinder_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ get_code_id_from_program_header(const sentry_module_t *module, size_t *size_out)
\
Elf64_Shdr strheader; \
ENSURE(sentry__module_read_safely(&strheader, module, \
elf.e_shoff + elf.e_shentsize * elf.e_shstrndx, \
elf.e_shoff + (uint64_t)elf.e_shentsize * elf.e_shstrndx, \
sizeof(Elf64_Shdr))); \
\
for (uint32_t i = 0; i < elf.e_shnum; i++) { \
Expand All @@ -385,7 +385,7 @@ get_code_id_from_program_header(const sentry_module_t *module, size_t *size_out)
\
Elf32_Shdr strheader; \
ENSURE(sentry__module_read_safely(&strheader, module, \
elf.e_shoff + elf.e_shentsize * elf.e_shstrndx, \
elf.e_shoff + (uint64_t)elf.e_shentsize * elf.e_shstrndx, \
sizeof(Elf32_Shdr))); \
\
for (uint32_t i = 0; i < elf.e_shnum; i++) { \
Expand Down

0 comments on commit f3ef6ed

Please sign in to comment.