diff options
Diffstat (limited to '')
-rw-r--r-- | mld/obj.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -67,7 +67,7 @@ static int load_ehdr(struct object *object) */ static int load_shdr(struct object *object) { - size_t shdr_len = B16(object->ehdr->e_shentsize) * + size_t shdr_len = sizeof(Elf32_Shdr) * B16(object->ehdr->e_shnum); size_t shdr_off = B32(object->ehdr->e_shoff); object->shdr = (Elf32_Shdr *) (object->mapped + shdr_off); @@ -334,6 +334,7 @@ int object_load(struct object *object, char *path, uint32_t index) object->mapped = NULL; object->name = path; object->index = index; + object->phdr = NULL; object->phdr_to_shdr_mapping = NULL; /** load the file */ |