diff options
Diffstat (limited to '')
-rw-r--r-- | mld/seg.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -43,6 +43,11 @@ static int load_shdr(struct object *obj, struct segment *seg, size_t index) } seg->name = &obj->shstrtab->data[name]; + if (seg->phdr->p_filesz != hdr->sh_size) { + ERROR("segment phdr and shdr file sizes to not match"); + return M_ERROR; + } + // map bytes uint32_t len = B32(hdr->sh_size); uint32_t off = B32(hdr->sh_offset); |