summaryrefslogtreecommitdiffhomepage
path: root/src/reader
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-01 07:57:39 -0500
committermidipix <writeonce@midipix.org>2016-12-01 07:57:39 -0500
commit9740a33c5d6bb235cc3a4fa6e687ed35dd1b34cc (patch)
tree2a164f4e456f9e477fe107af4012d675decc4c7b /src/reader
parent2486e675b16469a08b371006bacbe0f001e09eb6 (diff)
downloadperk-9740a33c5d6bb235cc3a4fa6e687ed35dd1b34cc.tar.bz2
perk-9740a33c5d6bb235cc3a4fa6e687ed35dd1b34cc.tar.xz
struct pe_{raw|meta}_sec_hdr: member name normalization.
Diffstat (limited to 'src/reader')
-rw-r--r--src/reader/pe_read_section_header.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/reader/pe_read_section_header.c b/src/reader/pe_read_section_header.c
index 04a9e61..ed5e1a3 100644
--- a/src/reader/pe_read_section_header.c
+++ b/src/reader/pe_read_section_header.c
@@ -13,21 +13,21 @@
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));
- memcpy(m,p,sizeof(p->name));
+ memset(m,0,sizeof(m->sh_name));
+ memcpy(m,p,sizeof(p->sh_name));
- m->long_name = 0;
- m->virtual_size = pe_read_long(p->virtual_size);
- m->virtual_addr = pe_read_long(p->virtual_addr);
- m->size_of_raw_data = pe_read_long(p->size_of_raw_data);
- m->ptr_to_raw_data = pe_read_long(p->ptr_to_raw_data);
- m->ptr_to_relocs = pe_read_long(p->ptr_to_relocs);
- m->ptr_to_line_nums = pe_read_long(p->ptr_to_line_nums);
+ m->sh_long_name = 0;
+ m->sh_virtual_size = pe_read_long(p->sh_virtual_size);
+ m->sh_virtual_addr = pe_read_long(p->sh_virtual_addr);
+ m->sh_size_of_raw_data = pe_read_long(p->sh_size_of_raw_data);
+ m->sh_ptr_to_raw_data = pe_read_long(p->sh_ptr_to_raw_data);
+ m->sh_ptr_to_relocs = pe_read_long(p->sh_ptr_to_relocs);
+ m->sh_ptr_to_line_nums = pe_read_long(p->sh_ptr_to_line_nums);
- m->num_of_relocs = pe_read_short(p->num_of_relocs);
- m->num_of_line_nums = pe_read_short(p->num_of_line_nums);
+ m->sh_num_of_relocs = pe_read_short(p->sh_num_of_relocs);
+ m->sh_num_of_line_nums = pe_read_short(p->sh_num_of_line_nums);
- m->characteristics = pe_read_long(p->characteristics);
+ m->sh_characteristics = pe_read_long(p->sh_characteristics);
return 0;
}