summaryrefslogtreecommitdiffhomepage
path: root/src/reader
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-02 17:03:27 -0500
committermidipix <writeonce@midipix.org>2016-12-02 17:16:29 -0500
commit0c1d8308d9ed0eb768298f9e889e8a1f1323242d (patch)
tree4929826b3f7310097ba4c26a1eea1d029a0ad22c /src/reader
parentc8c13111b25d5953956742de4c54e5856737df13 (diff)
downloadperk-0c1d8308d9ed0eb768298f9e889e8a1f1323242d.tar.bz2
perk-0c1d8308d9ed0eb768298f9e889e8a1f1323242d.tar.xz
struct pe_{raw|meta}_coff_symbol: member name normalization.
Diffstat (limited to 'src/reader')
-rw-r--r--src/reader/pe_read_coff_symbol.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/reader/pe_read_coff_symbol.c b/src/reader/pe_read_coff_symbol.c
index 0c6a40d..b7bb767 100644
--- a/src/reader/pe_read_coff_symbol.c
+++ b/src/reader/pe_read_coff_symbol.c
@@ -20,35 +20,35 @@ int pe_read_coff_symbol(
char * mark;
unsigned bias = 0;
- m->long_name = 0;
- m->value = pe_read_long(p->value);
- m->section_number = pe_read_short(p->section_number);
- m->type = pe_read_short(p->type);
- m->storage_class = p->storage_class[0];
- m->num_of_aux_symbols = p->num_of_aux_symbols[0];
-
- memset(m->name,0,sizeof(m->name));
-
- if (p->storage_class[0] == PE_IMAGE_SYM_CLASS_FILE)
- if (p->num_of_aux_symbols[0])
- if (!p[1].value[0])
+ m->cs_long_name = 0;
+ m->cs_value = pe_read_long(p->cs_value);
+ m->cs_section_number = pe_read_short(p->cs_section_number);
+ m->cs_type = pe_read_short(p->cs_type);
+ m->cs_storage_class = p->cs_storage_class[0];
+ m->cs_num_of_aux_symbols = p->cs_num_of_aux_symbols[0];
+
+ memset(m->cs_name,0,sizeof(m->cs_name));
+
+ if (p->cs_storage_class[0] == PE_IMAGE_SYM_CLASS_FILE)
+ if (p->cs_num_of_aux_symbols[0])
+ if (!p[1].cs_value[0])
bias = 1;
p += bias;
- if (!bias && (p->storage_class[0] == PE_IMAGE_SYM_CLASS_FILE)
- && p->num_of_aux_symbols[0]) {
- memcpy(m->name,p[1].name,sizeof(*p));
+ if (!bias && (p->cs_storage_class[0] == PE_IMAGE_SYM_CLASS_FILE)
+ && p->cs_num_of_aux_symbols[0]) {
+ memcpy(m->cs_name,p[1].cs_name,sizeof(*p));
- } else if (p->name[0]) {
- memcpy(m->name,p->name,sizeof(p->name));
+ } else if (p->cs_name[0]) {
+ memcpy(m->cs_name,p->cs_name,sizeof(p->cs_name));
- } else if (!p->name[1] && !p->name[2] && !p->name[3]) {
+ } else if (!p->cs_name[1] && !p->cs_name[2] && !p->cs_name[3]) {
mark = (char *)base;
- roffset = pe_read_long(&p->name[4]);
+ roffset = pe_read_long(&p->cs_name[4]);
if (roffset < coff->cfh_size_of_str_tbl)
- m->long_name = mark + coff->cfh_ptr_to_str_tbl + roffset;
+ m->cs_long_name = mark + coff->cfh_ptr_to_str_tbl + roffset;
}
return 0;