Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix MemoryGetProcAddress by ordinal value #96

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zoand
Copy link

@zoand zoand commented Dec 24, 2019

load function by ordinal value

@zoand zoand closed this Dec 24, 2019
@zoand zoand reopened this Dec 24, 2019
@Elmue
Copy link

Elmue commented Jul 8, 2020

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
rozmansi added a commit to rozmansi/MemoryModule that referenced this pull request Nov 7, 2020
Sign up for free to 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