summaryrefslogtreecommitdiffhomepage
path: root/src/reader
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader')
-rw-r--r--src/reader/pe_read_optional_header.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c
index 148dc2d..22d9321 100644
--- a/src/reader/pe_read_optional_header.c
+++ b/src/reader/pe_read_optional_header.c
@@ -78,20 +78,20 @@ static int pe_read_optional_header_structs(const union pe_raw_opt_hdr * p, struc
m->img.coh_dll_characteristics = pe_read_short(aimg->coh_dll_characteristics);
/* ldr */
- m->ldr.loader_flags = pe_read_long(aldr->loader_flags);
- m->ldr.rva_and_sizes = pe_read_long(aldr->rva_and_sizes);
+ m->ldr.coh_loader_flags = pe_read_long(aldr->coh_loader_flags);
+ m->ldr.coh_rva_and_sizes = pe_read_long(aldr->coh_rva_and_sizes);
/* dirs */
- if (m->ldr.rva_and_sizes > 0x10)
+ if (m->ldr.coh_rva_and_sizes > 0x10)
return PERK_ERR_BAD_IMAGE_TYPE;
- if (m->ldr.rva_and_sizes < 0x10)
+ if (m->ldr.coh_rva_and_sizes < 0x10)
memset(&m->dirs,0,sizeof(m->dirs));
mark = p->opt_hdr_64.export_tbl;
pdir = &m->dirs.export_tbl;
- for (i=0; i<m->ldr.rva_and_sizes; i++) {
+ for (i=0; i<m->ldr.coh_rva_and_sizes; i++) {
pdir[i].rva = pe_read_long(&mark[i*8]);
pdir[i].size = pe_read_long(&mark[i*8+4]);
}