diff options
author | midipix <writeonce@midipix.org> | 2016-12-01 07:59:15 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-12-01 08:00:30 -0500 |
commit | 234d23d13af110517ce9e386eb2389ab1a1c1d85 (patch) | |
tree | 8540cb20903cb6f93210256af830ec8457f02c66 | |
parent | 901664123d8a653173953ba5d48a56fdaf3dc351 (diff) | |
download | pemagine-234d23d13af110517ce9e386eb2389ab1a1c1d85.tar.bz2 pemagine-234d23d13af110517ce9e386eb2389ab1a1c1d85.tar.xz |
struct pe_raw_sec_hdr: member name normalization.
-rw-r--r-- | include/pemagine/pe_structs.h | 20 | ||||
-rw-r--r-- | src/headers/pe_get_image_section_tbl_addr.c | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/pemagine/pe_structs.h b/include/pemagine/pe_structs.h index ad8a7a8..e965b6e 100644 --- a/include/pemagine/pe_structs.h +++ b/include/pemagine/pe_structs.h @@ -230,16 +230,16 @@ struct pe_raw_image_data_dir { struct pe_raw_sec_hdr { - unsigned char name [0x08]; /* 0x00 */ - unsigned char virtual_size [0x04]; /* 0x08 */ - unsigned char virtual_addr [0x04]; /* 0x0c */ - unsigned char size_of_raw_data [0x04]; /* 0x10 */ - unsigned char ptr_to_raw_data [0x04]; /* 0x14 */ - unsigned char ptr_to_relocs [0x04]; /* 0x18 */ - unsigned char ptr_to_line_nums [0x04]; /* 0x1c */ - unsigned char num_of_relocs [0x02]; /* 0x20 */ - unsigned char num_of_line_nums [0x02]; /* 0x22 */ - unsigned char characteristics [0x04]; /* 0x24 */ + unsigned char sh_name [0x08]; /* 0x00 */ + unsigned char sh_virtual_size [0x04]; /* 0x08 */ + unsigned char sh_virtual_addr [0x04]; /* 0x0c */ + unsigned char sh_size_of_raw_data [0x04]; /* 0x10 */ + unsigned char sh_ptr_to_raw_data [0x04]; /* 0x14 */ + unsigned char sh_ptr_to_relocs [0x04]; /* 0x18 */ + unsigned char sh_ptr_to_line_nums [0x04]; /* 0x1c */ + unsigned char sh_num_of_relocs [0x02]; /* 0x20 */ + unsigned char sh_num_of_line_nums [0x02]; /* 0x22 */ + unsigned char sh_characteristics [0x04]; /* 0x24 */ }; diff --git a/src/headers/pe_get_image_section_tbl_addr.c b/src/headers/pe_get_image_section_tbl_addr.c index 92a2f78..98420de 100644 --- a/src/headers/pe_get_image_section_tbl_addr.c +++ b/src/headers/pe_get_image_section_tbl_addr.c @@ -61,7 +61,7 @@ struct pe_raw_sec_hdr * pe_get_image_named_section_addr(const void * base, const ch[pos] = name[pos]; for (; count; hdr++,count--) - if (*(uint64_t *)hdr->name == sname) + if (*(uint64_t *)hdr->sh_name == sname) return hdr; } |