summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-01-10 13:18:55 -0500
committermidipix <writeonce@midipix.org>2016-11-10 23:35:36 -0500
commitc3f597ea8d410c30b0c757adb75b2608ad7a4ff9 (patch)
tree50b7812547ad8dc573e38f56a3747cc4e876e48c
parentc7189ea266edee9e39fe6d03d983e7e35448cb9e (diff)
downloadperk-c3f597ea8d410c30b0c757adb75b2608ad7a4ff9.tar.bz2
perk-c3f597ea8d410c30b0c757adb75b2608ad7a4ff9.tar.xz
a sign from heaven.
-rw-r--r--include/perk/perk.h6
-rw-r--r--src/logic/pe_get_image_meta.c5
-rw-r--r--src/output/pe_output_export_symbols.c2
-rw-r--r--src/output/pe_output_import_libraries.c3
4 files changed, 9 insertions, 7 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h
index 3dcc86b..a99c8f4 100644
--- a/include/perk/perk.h
+++ b/include/perk/perk.h
@@ -52,9 +52,9 @@ struct pe_raw_image {
};
struct pe_image_summary {
- uint32_t nexpsyms;
- uint32_t nimplibs;
- uint32_t nrelocs;
+ int32_t nexpsyms;
+ int32_t nimplibs;
+ int32_t nrelocs;
};
struct pe_image_meta {
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index 65f7922..8da2c90 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -14,7 +14,7 @@
static int pe_free_image_meta_impl(struct pe_image_meta * meta, int status)
{
- unsigned i;
+ int i;
if (meta) {
for (i=0; i<meta->summary.nimplibs; i++)
@@ -60,7 +60,8 @@ int pe_get_block_section_index(const struct pe_image_meta * m, const struct pe_b
int pe_get_image_meta(const struct pe_raw_image * image, struct pe_image_meta ** meta)
{
- int i,j,s,status;
+ int i,s,status;
+ unsigned j;
struct pe_image_meta * m;
char * base = image->addr;
diff --git a/src/output/pe_output_export_symbols.c b/src/output/pe_output_export_symbols.c
index 94d0037..642d539 100644
--- a/src/output/pe_output_export_symbols.c
+++ b/src/output/pe_output_export_symbols.c
@@ -37,7 +37,7 @@ int pe_output_export_symbols(
FILE * ftmp;
uint32_t offset;
uint32_t * symrva;
- int i;
+ unsigned i;
if (!m->hedata)
return 0;
diff --git a/src/output/pe_output_import_libraries.c b/src/output/pe_output_import_libraries.c
index 3b71018..a2eb01b 100644
--- a/src/output/pe_output_import_libraries.c
+++ b/src/output/pe_output_import_libraries.c
@@ -47,7 +47,8 @@ int pe_output_import_libraries(
FILE * fout)
{
FILE * ftmp;
- int i,j;
+ int i;
+ unsigned j;
if (!m->summary.nimplibs)
return 0;