mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Parse notes only after object structure had been allocated.
Reported by: kargl Reviewed by: kib (sans whitespace)
This commit is contained in:
parent
b19ee1c6ef
commit
d958a71be2
1 changed files with 2 additions and 2 deletions
|
|
@ -153,7 +153,6 @@ map_object(int fd, const char *path, const struct stat *sb)
|
|||
break;
|
||||
note_start = (Elf_Addr)(char *)hdr + phdr->p_offset;
|
||||
note_end = note_start + phdr->p_filesz;
|
||||
digest_notes(obj, note_start, note_end);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -291,7 +290,8 @@ map_object(int fd, const char *path, const struct stat *sb)
|
|||
obj->stack_flags = stack_flags;
|
||||
obj->relro_page = obj->relocbase + trunc_page(relro_page);
|
||||
obj->relro_size = round_page(relro_size);
|
||||
|
||||
if (note_start < note_end)
|
||||
digest_notes(obj, note_start, note_end);
|
||||
munmap(hdr, PAGE_SIZE);
|
||||
return (obj);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue