Skip to content

fix MemoryGetProcAddress by ordinal value - #96

Open
zoand wants to merge 3 commits into
fancycode:masterfrom
zoand:master
Open

fix MemoryGetProcAddress by ordinal value#96
zoand wants to merge 3 commits into
fancycode:masterfrom
zoand:master

Conversation

@zoand

Copy link
Copy Markdown

load function by ordinal value

@zoandzoand closed this Dec 24, 2019
@zoandzoand reopened this Dec 24, 2019
@Elmue

Elmue commented Jul 8, 2020

Copy link
Copy Markdown

You are right. This is a bug.
But your bugfix can be simpler:
It is is enough to check for
exports->NumberOfFunctions == 0
because NumberOfNames is zero when only ordinals are exported while NumberOfFunctions is greater than zero whenever ANY function is exported.

Once again the code from Joachim is extremely awkward and clumsy.
Neither malloc() nor qsort() nor bsearch() nor _find() nor _compare() are required in this function to find an exported function.

rozmansi added a commit to rozmansi/MemoryModule that referenced this pull request Nov 7, 2020
See-also: fancycode#96
Signed-off-by: Simon Rozman <simon@rozman.si>
rozmansi added a commit to rozmansi/MemoryModule that referenced this pull request Nov 7, 2020
See-also: fancycode#96
Signed-off-by: Simon Rozman <simon@rozman.si>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@zoand@Elmue