summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/perk/perk_meta.h12
-rw-r--r--src/reader/pe_read_optional_header.c24
2 files changed, 18 insertions, 18 deletions
diff --git a/include/perk/perk_meta.h b/include/perk/perk_meta.h
index 5abf507..272b4d6 100644
--- a/include/perk/perk_meta.h
+++ b/include/perk/perk_meta.h
@@ -161,12 +161,12 @@ struct pe_meta_opt_hdr_mem_64 {
};
struct pe_meta_opt_hdr_mem {
- uint64_t base_of_data;
- uint64_t image_base;
- uint64_t size_of_stack_reserve;
- uint64_t size_of_stack_commit;
- uint64_t size_of_heap_reserve;
- uint64_t size_of_heap_commit;
+ uint64_t coh_base_of_data;
+ uint64_t coh_image_base;
+ uint64_t coh_size_of_stack_reserve;
+ uint64_t coh_size_of_stack_commit;
+ uint64_t coh_size_of_heap_reserve;
+ uint64_t coh_size_of_heap_commit;
};
struct pe_meta_opt_hdr {
diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c
index 0c6c302..274a22d 100644
--- a/src/reader/pe_read_optional_header.c
+++ b/src/reader/pe_read_optional_header.c
@@ -108,21 +108,21 @@ int pe_read_optional_header(const union pe_raw_opt_hdr * p, struct pe_meta_opt_h
switch (m->std.coh_magic) {
case PE_MAGIC_PE32:
- m->mem.base_of_data = pe_read_long(p->opt_hdr_32.base_of_data);
- m->mem.image_base = pe_read_long(p->opt_hdr_32.image_base);
- m->mem.size_of_stack_reserve = pe_read_long(p->opt_hdr_32.size_of_stack_reserve);
- m->mem.size_of_stack_commit = pe_read_long(p->opt_hdr_32.size_of_stack_commit);
- m->mem.size_of_heap_reserve = pe_read_long(p->opt_hdr_32.size_of_heap_reserve);
- m->mem.size_of_heap_commit = pe_read_long(p->opt_hdr_32.size_of_heap_commit);
+ m->mem.coh_base_of_data = pe_read_long(p->opt_hdr_32.base_of_data);
+ m->mem.coh_image_base = pe_read_long(p->opt_hdr_32.image_base);
+ m->mem.coh_size_of_stack_reserve = pe_read_long(p->opt_hdr_32.size_of_stack_reserve);
+ m->mem.coh_size_of_stack_commit = pe_read_long(p->opt_hdr_32.size_of_stack_commit);
+ m->mem.coh_size_of_heap_reserve = pe_read_long(p->opt_hdr_32.size_of_heap_reserve);
+ m->mem.coh_size_of_heap_commit = pe_read_long(p->opt_hdr_32.size_of_heap_commit);
break;
case PE_MAGIC_PE32_PLUS:
- m->mem.base_of_data = (uint64_t)-1;
- m->mem.image_base = pe_read_quad(p->opt_hdr_64.image_base);
- m->mem.size_of_stack_reserve = pe_read_quad(p->opt_hdr_64.size_of_stack_reserve);
- m->mem.size_of_stack_commit = pe_read_quad(p->opt_hdr_64.size_of_stack_commit);
- m->mem.size_of_heap_reserve = pe_read_quad(p->opt_hdr_64.size_of_heap_reserve);
- m->mem.size_of_heap_commit = pe_read_quad(p->opt_hdr_64.size_of_heap_commit);
+ m->mem.coh_base_of_data = (uint64_t)-1;
+ m->mem.coh_image_base = pe_read_quad(p->opt_hdr_64.image_base);
+ m->mem.coh_size_of_stack_reserve = pe_read_quad(p->opt_hdr_64.size_of_stack_reserve);
+ m->mem.coh_size_of_stack_commit = pe_read_quad(p->opt_hdr_64.size_of_stack_commit);
+ m->mem.coh_size_of_heap_reserve = pe_read_quad(p->opt_hdr_64.size_of_heap_reserve);
+ m->mem.coh_size_of_heap_commit = pe_read_quad(p->opt_hdr_64.size_of_heap_commit);
break;
}