aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-09-05 17:06:40 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-09-05 17:06:40 +0100
commita9792c6b93c4857bab10b6bebe206e8cf016c2ab (patch)
treeae4ea563a8205321532499df2898299243e536fb /com32/lib/sys
parentf44155fa7406f505642f5d1433f1e4127e025ce4 (diff)
parenta40bb65a4d1351c7c2b414152186f63aa5ea2a07 (diff)
downloadsyslinux-a9792c6b93c4857bab10b6bebe206e8cf016c2ab.tar.gz
syslinux-a9792c6b93c4857bab10b6bebe206e8cf016c2ab.tar.xz
syslinux-a9792c6b93c4857bab10b6bebe206e8cf016c2ab.zip
Merge branch 'elflink' into for-hpa/elflink/firmware
We need to pick up a couple of bug fixes, one of which causes some machines to hang because we're walking out of the bounds of an ELF symbol table. Conflicts: com32/lib/Makefile core/init.c
Diffstat (limited to 'com32/lib/sys')
-rw-r--r--com32/lib/sys/module/common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/com32/lib/sys/module/common.c b/com32/lib/sys/module/common.c
index e6af4860..50b8a9f6 100644
--- a/com32/lib/sys/module/common.c
+++ b/com32/lib/sys/module/common.c
@@ -47,7 +47,7 @@ void print_elf_symbols(struct elf_module *module) {
unsigned int i;
Elf_Sym *crt_sym;
- for (i = 1; i < module->symtable_size; i++)
+ for (i = 1; i < module->symtable_size/module->syment_size; i++)
{
crt_sym = (Elf_Sym*)(module->sym_table + i*module->syment_size);
@@ -323,7 +323,7 @@ int check_symbols(struct elf_module *module)
int strong_count;
int weak_count;
- for(i = 1; i < module->symtable_size; i++)
+ for (i = 1; i < module->symtable_size/module->syment_size; i++)
{
crt_sym = symbol_get_entry(module, i);
crt_name = module->str_table + crt_sym->st_name;
@@ -542,7 +542,7 @@ static Elf_Sym *module_find_symbol_iterate(const char *name,struct elf_module *m
unsigned int i;
Elf_Sym *crt_sym;
- for (i=1; i < module->symtable_size; i++)
+ for (i = 1; i < module->symtable_size/module->syment_size; i++)
{
crt_sym = symbol_get_entry(module, i);
if (strcmp(name, module->str_table + crt_sym->st_name) == 0)