diff options
author | midipix <writeonce@midipix.org> | 2016-11-19 11:33:07 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-19 11:33:07 -0500 |
commit | 99c4526766e22ec051156c716a698402329f793e (patch) | |
tree | 1d8b898ba3f59dd58e0da21d1da361d420fd3d47 | |
parent | a1fa1e770d82fa51a669a3e96287262970946e79 (diff) | |
download | perk-99c4526766e22ec051156c716a698402329f793e.tar.bz2 perk-99c4526766e22ec051156c716a698402329f793e.tar.xz |
PE format: struct pe_image_dos_hdr --> struct pe_raw_image_dos_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_dos_header.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h index 11555f3..cd15c39 100644 --- a/include/perk/perk.h +++ b/include/perk/perk.h @@ -98,7 +98,7 @@ struct pe_image_meta { struct pe_meta_opt_hdr opt; struct pe_meta_sec_hdr * sectbl; - struct pe_image_dos_hdr * ados; + struct pe_raw_image_dos_hdr * ados; struct pe_coff_file_hdr * acoff; union pe_opt_hdr * aopt; struct pe_sec_hdr * asectbl; @@ -196,7 +196,7 @@ perk_api int pe_get_image_subsystem (const struct pe_image_meta *, struct pe_in perk_api int pe_get_image_framework (const struct pe_image_meta *, struct pe_info_string * optional); /* low-level api */ -perk_api int pe_read_dos_header (const struct pe_image_dos_hdr *, struct pe_meta_image_dos_hdr *); +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_coff_file_hdr *, struct pe_meta_coff_file_hdr *); perk_api int pe_read_optional_header (const union pe_opt_hdr *, struct pe_meta_opt_hdr *); perk_api int pe_read_section_header (const struct pe_sec_hdr *, struct pe_meta_sec_hdr *); diff --git a/include/perk/perk_structs.h b/include/perk/perk_structs.h index f012d33..5e40999 100644 --- a/include/perk/perk_structs.h +++ b/include/perk/perk_structs.h @@ -5,7 +5,7 @@ extern "C" { #endif -struct pe_image_dos_hdr { +struct pe_raw_image_dos_hdr { unsigned char dos_magic [0x02]; /* 0x00 */ unsigned char dos_cblp [0x02]; /* 0x02 */ unsigned char dos_cp [0x02]; /* 0x04 */ diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c index d262d25..e735da5 100644 --- a/src/logic/pe_get_image_meta.c +++ b/src/logic/pe_get_image_meta.c @@ -177,7 +177,7 @@ int pe_get_image_meta( if (!(m = calloc(1,sizeof(*m)))) return PERK_SYSTEM_ERROR(dctx); - m->ados = (struct pe_image_dos_hdr *)base; + m->ados = (struct pe_raw_image_dos_hdr *)base; if ((ret = (pe_read_dos_header(m->ados,&m->dos)))) return pe_free_image_meta_impl( diff --git a/src/reader/pe_read_dos_header.c b/src/reader/pe_read_dos_header.c index 440063e..ebdfc05 100644 --- a/src/reader/pe_read_dos_header.c +++ b/src/reader/pe_read_dos_header.c @@ -10,7 +10,7 @@ #include "perk_endian_impl.h" #include "perk_reader_impl.h" -int pe_read_dos_header(const struct pe_image_dos_hdr * p, struct pe_meta_image_dos_hdr * m) +int pe_read_dos_header(const struct pe_raw_image_dos_hdr * p, struct pe_meta_image_dos_hdr * m) { if ((p->dos_magic[0] != 'M') || (p->dos_magic[1] != 'Z')) return PERK_ERR_BAD_DOS_HEADER; |