Fix: lttng-elf: wrong error label used by error path
[lttng-tools.git] / src / common / lttng-elf.c
index bef20ffd4bd52eceb7fec353f885e22e6e9db6d8..08eb5a64cc8fbfb5818682c9e48babc93bac4af6 100644 (file)
@@ -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_string_table_data;
+       }
+
        sym_count = symtab_hdr.sh_size / symtab_hdr.sh_entsize;
 
        /* Loop over all symbol. */
This page took 0.023698 seconds and 4 git commands to generate.