X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Flttng-elf.c;h=807d785cedca27e5b4058193e203bf410a87a349;hb=f03ea3f43450abb1a1ea704044e1e8c78cfc0b4c;hp=d6cef2fe8632fe08aa150e7816865e86fd3e79bc;hpb=983a481e7516ab54b3697a28aa16a81f51573152;p=lttng-tools.git diff --git a/src/common/lttng-elf.c b/src/common/lttng-elf.c index d6cef2fe8..807d785ce 100644 --- a/src/common/lttng-elf.c +++ b/src/common/lttng-elf.c @@ -823,6 +823,12 @@ int lttng_elf_get_symbol_offset(int fd, char *symbol, uint64_t *offset) } /* Get the number of symbol in the table for the iteration. */ + if (symtab_hdr.sh_entsize == 0) { + DBG("Invalid ELF string table entry size."); + ret = LTTNG_ERR_ELF_PARSING; + goto free_string_table_data; + } + sym_count = symtab_hdr.sh_size / symtab_hdr.sh_entsize; /* Loop over all symbol. */