Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/taviso/loadlibrary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Bolyukin <iam@lach.pw>2022-01-23 21:19:19 +0300
committerGitHub <noreply@github.com>2022-01-23 21:19:19 +0300
commite3af2aa1f34b79e8ab6cb56fbdf21d3b594ffb2f (patch)
tree05c34d693b13777f25710c3a99800332cbe8dae7
parent105e1e4046533253f632bebe17c96154642e9dfc (diff)
fix: reset num_pe_exports on export dir parsing
-rw-r--r--peloader/pe_linker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/peloader/pe_linker.c b/peloader/pe_linker.c
index b209886..cbdad73 100644
--- a/peloader/pe_linker.c
+++ b/peloader/pe_linker.c
@@ -322,6 +322,7 @@ static int read_exports(struct pe_image *pe)
export_dir_table->AddressOfNameOrdinals);
pe_exports = calloc(export_dir_table->NumberOfNames, sizeof(struct pe_exports));
+ num_pe_exports = 0;
for (i = 0; i < export_dir_table->NumberOfNames; i++) {
uint32_t address = ((uint32_t *) (pe->image + export_dir_table->AddressOfFunctions))[*ordinal_table];