diff options
author | midipix <writeonce@midipix.org> | 2016-11-19 12:14:34 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-19 12:14:34 -0500 |
commit | a09b565929cdefee54c76c828a2ebc90fbb0de1b (patch) | |
tree | 7ba0f30b42caa212c6c1a766c8603825f1e88b0a | |
parent | cef008c5e5c0af051bc5b85762097f717b3c1a35 (diff) | |
download | perk-a09b565929cdefee54c76c828a2ebc90fbb0de1b.tar.bz2 perk-a09b565929cdefee54c76c828a2ebc90fbb0de1b.tar.xz |
PE format: struct pe_sec_hdr --> struct pe_raw_sec_hdr.
-rw-r--r-- | include/perk/perk.h | 4 | ||||
-rw-r--r-- | include/perk/perk_structs.h | 2 | ||||
-rw-r--r-- | src/logic/pe_get_image_meta.c | 2 | ||||
-rw-r--r-- | src/reader/pe_read_section_header.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h index 1aa5e0c..dfd932f 100644 --- a/include/perk/perk.h +++ b/include/perk/perk.h @@ -101,7 +101,7 @@ struct pe_image_meta { struct pe_raw_image_dos_hdr * ados; struct pe_raw_coff_file_hdr * acoff; union pe_raw_opt_hdr * aopt; - struct pe_sec_hdr * asectbl; + struct pe_raw_sec_hdr * asectbl; struct pe_meta_export_hdr edata; struct pe_export_hdr * aedata; @@ -199,7 +199,7 @@ perk_api int pe_get_image_framework (const struct pe_image_meta *, struct pe_in perk_api int pe_read_dos_header (const struct pe_raw_image_dos_hdr *, struct pe_meta_image_dos_hdr *); perk_api int pe_read_coff_header (const struct pe_raw_coff_file_hdr *, struct pe_meta_coff_file_hdr *); perk_api int pe_read_optional_header (const union pe_raw_opt_hdr *, struct pe_meta_opt_hdr *); -perk_api int pe_read_section_header (const struct pe_sec_hdr *, struct pe_meta_sec_hdr *); +perk_api int pe_read_section_header (const struct pe_raw_sec_hdr *, struct pe_meta_sec_hdr *); perk_api int pe_read_export_header (const struct pe_export_hdr *, struct pe_meta_export_hdr *); perk_api int pe_read_import_header (const struct pe_import_hdr *, struct pe_meta_import_hdr *); diff --git a/include/perk/perk_structs.h b/include/perk/perk_structs.h index 5832eb1..a8aa069 100644 --- a/include/perk/perk_structs.h +++ b/include/perk/perk_structs.h @@ -229,7 +229,7 @@ struct pe_raw_image_data_dir { }; -struct pe_sec_hdr { +struct pe_raw_sec_hdr { unsigned char name [0x08]; /* 0x00 */ unsigned char virtual_size [0x04]; /* 0x08 */ unsigned char virtual_addr [0x04]; /* 0x0c */ diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c index 1a24913..a0c77f1 100644 --- a/src/logic/pe_get_image_meta.c +++ b/src/logic/pe_get_image_meta.c @@ -204,7 +204,7 @@ int pe_get_image_meta( m,PERK_CUSTOM_ERROR(dctx,ret)); mark = &m->aopt->opt_hdr_32.magic[0]; - m->asectbl = (struct pe_sec_hdr *)(mark + m->coff.size_of_opt_hdr); + m->asectbl = (struct pe_raw_sec_hdr *)(mark + m->coff.size_of_opt_hdr); if (!(m->sectbl = calloc(m->coff.num_of_sections,sizeof(*(m->sectbl))))) return pe_free_image_meta_impl( diff --git a/src/reader/pe_read_section_header.c b/src/reader/pe_read_section_header.c index 01024d9..04a9e61 100644 --- a/src/reader/pe_read_section_header.c +++ b/src/reader/pe_read_section_header.c @@ -10,7 +10,7 @@ #include "perk_endian_impl.h" #include "perk_reader_impl.h" -int pe_read_section_header(const struct pe_sec_hdr * p, struct pe_meta_sec_hdr * m) +int pe_read_section_header(const struct pe_raw_sec_hdr * p, struct pe_meta_sec_hdr * m) { /* name: meta struct conveniently contains null termination */ memset(m,0,sizeof(m->name)); |