summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-30 19:51:35 -0500
committermidipix <writeonce@midipix.org>2016-11-30 19:51:35 -0500
commit9fdefdbcf17d60170da462a8c65ad0f863b3f465 (patch)
tree44a33ebb28a667b4e3dd08d4406603cfbae9ccd2
parentb69b15112efed38cea1e09629914ba3cfdbe391f (diff)
downloadperk-9fdefdbcf17d60170da462a8c65ad0f863b3f465.tar.bz2
perk-9fdefdbcf17d60170da462a8c65ad0f863b3f465.tar.xz
struct pe_{raw|meta}_opt_hdr_vers: member name normalization.
-rw-r--r--include/perk/perk_meta.h14
-rw-r--r--include/perk/perk_structs.h14
-rw-r--r--src/reader/pe_read_optional_header.c16
3 files changed, 22 insertions, 22 deletions
diff --git a/include/perk/perk_meta.h b/include/perk/perk_meta.h
index 01d72ef..24086d4 100644
--- a/include/perk/perk_meta.h
+++ b/include/perk/perk_meta.h
@@ -102,13 +102,13 @@ struct pe_meta_opt_hdr_align {
};
struct pe_meta_opt_hdr_vers {
- uint16_t major_os_ver;
- uint16_t minor_os_ver;
- uint16_t major_image_ver;
- uint16_t minor_image_ver;
- uint16_t major_subsys_ver;
- uint16_t minor_subsys_ver;
- uint32_t win32_ver;
+ uint16_t coh_major_os_ver;
+ uint16_t coh_minor_os_ver;
+ uint16_t coh_major_image_ver;
+ uint16_t coh_minor_image_ver;
+ uint16_t coh_major_subsys_ver;
+ uint16_t coh_minor_subsys_ver;
+ uint32_t coh_win32_ver;
};
struct pe_meta_opt_hdr_img {
diff --git a/include/perk/perk_structs.h b/include/perk/perk_structs.h
index 9a20036..c942f47 100644
--- a/include/perk/perk_structs.h
+++ b/include/perk/perk_structs.h
@@ -57,13 +57,13 @@ struct pe_raw_opt_hdr_align {
};
struct pe_raw_opt_hdr_vers {
- unsigned char major_os_ver [0x02]; /* 0x28 */
- unsigned char minor_os_ver [0x02]; /* 0x2a */
- unsigned char major_image_ver [0x02]; /* 0x2c */
- unsigned char minor_image_ver [0x02]; /* 0x2e */
- unsigned char major_subsys_ver [0x02]; /* 0x30 */
- unsigned char minor_subsys_ver [0x02]; /* 0x32 */
- unsigned char win32_ver [0x04]; /* 0x34 */
+ unsigned char coh_major_os_ver [0x02]; /* 0x28 */
+ unsigned char coh_minor_os_ver [0x02]; /* 0x2a */
+ unsigned char coh_major_image_ver [0x02]; /* 0x2c */
+ unsigned char coh_minor_image_ver [0x02]; /* 0x2e */
+ unsigned char coh_major_subsys_ver [0x02]; /* 0x30 */
+ unsigned char coh_minor_subsys_ver [0x02]; /* 0x32 */
+ unsigned char coh_win32_ver [0x04]; /* 0x34 */
};
struct pe_raw_opt_hdr_img {
diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c
index 5a2e10a..f331604 100644
--- a/src/reader/pe_read_optional_header.c
+++ b/src/reader/pe_read_optional_header.c
@@ -56,14 +56,14 @@ static int pe_read_optional_header_structs(const union pe_raw_opt_hdr * p, struc
m->std.coh_base_of_code = pe_read_long(astd->coh_base_of_code);
/* vers */
- m->vers.major_os_ver = pe_read_short(avers->major_os_ver);
- m->vers.minor_os_ver = pe_read_short(avers->minor_os_ver);
- m->vers.major_image_ver = pe_read_short(avers->major_image_ver);
- m->vers.minor_image_ver = pe_read_short(avers->minor_image_ver);
- m->vers.major_subsys_ver = pe_read_short(avers->major_subsys_ver);
- m->vers.minor_subsys_ver = pe_read_short(avers->minor_subsys_ver);
-
- m->vers.win32_ver = pe_read_long(avers->win32_ver);
+ m->vers.coh_major_os_ver = pe_read_short(avers->coh_major_os_ver);
+ m->vers.coh_minor_os_ver = pe_read_short(avers->coh_minor_os_ver);
+ m->vers.coh_major_image_ver = pe_read_short(avers->coh_major_image_ver);
+ m->vers.coh_minor_image_ver = pe_read_short(avers->coh_minor_image_ver);
+ m->vers.coh_major_subsys_ver = pe_read_short(avers->coh_major_subsys_ver);
+ m->vers.coh_minor_subsys_ver = pe_read_short(avers->coh_minor_subsys_ver);
+
+ m->vers.coh_win32_ver = pe_read_long(avers->coh_win32_ver);
/* align */
m->align.coh_section_align = pe_read_long(aalign->coh_section_align);