last fix
This commit is contained in:
parent
88ed6d1ad9
commit
71c9d7703f
3
src/nm.c
3
src/nm.c
|
@ -140,6 +140,9 @@ int nm64(t_mapped_file mapped_file, char *path, t_verbosity verbosity, t_orderin
|
|||
if (get_header64(mapped_file, &header) == FT_NM_FAILURE) {
|
||||
return FT_NM_FAILURE;
|
||||
}
|
||||
if (header.e_ehsize != 64) {
|
||||
return FT_NM_FAILURE;
|
||||
}
|
||||
uint64_t addr = header.e_shoff + header.e_shentsize * header.e_shstrndx;
|
||||
Elf64_Shdr *shstrtb;
|
||||
if (!(shstrtb = (Elf64_Shdr *)fetch(mapped_file, addr, header.e_shentsize))) {
|
||||
|
|
|
@ -140,6 +140,9 @@ int nm32(t_mapped_file mapped_file, char *path, t_verbosity verbosity, t_orderin
|
|||
if (get_header32(mapped_file, &header) == FT_NM_FAILURE) {
|
||||
return FT_NM_FAILURE;
|
||||
}
|
||||
if (header.e_ehsize != 52) {
|
||||
return FT_NM_FAILURE;
|
||||
}
|
||||
uint32_t addr = header.e_shoff + header.e_shentsize * header.e_shstrndx;
|
||||
Elf32_Shdr *shstrtb;
|
||||
if (!(shstrtb = (Elf32_Shdr *)fetch(mapped_file, addr, header.e_shentsize))) {
|
||||
|
|
Loading…
Reference in New Issue