Damage control. Correcly advance symtab and strtab pointers, not

table length values.

Spotted by:	iedowse
This commit is contained in:
Alexander Kabaev 2004-07-28 08:59:08 +00:00
parent 1bb0b6dee7
commit 0171fe42f2

View File

@ -171,10 +171,10 @@ db_init(void)
if (ksym_end > ksym_start && ksym_start != 0) {
symtab = ksym_start;
tabsz = *((Elf_Size*)symtab);
tabsz += sizeof(Elf_Size);
symtab += sizeof(Elf_Size);
strtab = symtab + tabsz;
strsz = *((Elf_Size*)strtab);
strsz += sizeof(Elf_Size);
strtab += sizeof(Elf_Size);
if (strtab + strsz <= ksym_end) {
db_add_symbol_table((char *)symtab,
(char *)(symtab + tabsz), "elf", (char *)strtab);