Re: [PATCH] libiberty: Check zero value shstrndx in simple-object-elf.c

2019-07-12 Thread Ian Lance Taylor
On Fri, Jul 12, 2019 at 3:04 PM Ren Kimura wrote: > > This patch fixes a Bug 90924. > simple_object_elf functions don't load section table 0 of ELF file, which is > not a useful. > However If e_shstrndx in ELF header points to a section table 0 (i.e. > e_shstrndx == 0), a calculation of offset t

[PATCH] libiberty: Check zero value shstrndx in simple-object-elf.c

2019-07-12 Thread Ren Kimura
This patch fixes a Bug 90924. simple_object_elf functions don't load section table 0 of ELF file, which is not a useful. However If e_shstrndx in ELF header points to a section table 0 (i.e. e_shstrndx == 0), a calculation of offset to string section table causes integer overflow at every line "