X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Flttng-elf.c;h=7369f29c517cd9489d78ab2bfc9bd7756c0f90f9;hb=339ab1de3d02379aa67ffcba6c324803a3b6f3f2;hp=bef20ffd4bd52eceb7fec353f885e22e6e9db6d8;hpb=420e125556b416f84193298c239410018a228697;p=lttng-tools.git diff --git a/src/common/lttng-elf.c b/src/common/lttng-elf.c index bef20ffd4..7369f29c5 100644 --- a/src/common/lttng-elf.c +++ b/src/common/lttng-elf.c @@ -814,6 +814,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_symbol_table_data; + } + sym_count = symtab_hdr.sh_size / symtab_hdr.sh_entsize; /* Loop over all symbol. */