summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2004-07-28 08:59:08 +0000
committerkan <kan@FreeBSD.org>2004-07-28 08:59:08 +0000
commitf630ab6cf1b08be7130c4f28a23b62524ec078ad (patch)
treedfe0ddf90220e73926c4b3b6aab6fcbf2719118b /sys/ddb
parentc8e1a3d9de56905f7ad926bcd808a4412886abf9 (diff)
downloadFreeBSD-src-f630ab6cf1b08be7130c4f28a23b62524ec078ad.zip
FreeBSD-src-f630ab6cf1b08be7130c4f28a23b62524ec078ad.tar.gz
Damage control. Correcly advance symtab and strtab pointers, not
table length values. Spotted by: iedowse
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ddb/db_main.c b/sys/ddb/db_main.c
index 0a2cd56..8344dee 100644
--- a/sys/ddb/db_main.c
+++ b/sys/ddb/db_main.c
@@ -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);
OpenPOWER on IntegriCloud