Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4cbf118d
Commit
4cbf118d
authored
Nov 29, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for a valid module before attempting to read the export
directory in LdrGetProcedureAddress.
parent
220edd52
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
loader.c
dlls/ntdll/loader.c
+3
-6
No files found.
dlls/ntdll/loader.c
View file @
4cbf118d
...
...
@@ -1181,7 +1181,9 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
RtlEnterCriticalSection
(
&
loader_section
);
if
((
exports
=
RtlImageDirectoryEntryToData
(
module
,
TRUE
,
/* check if the module itself is invalid to return the proper error */
if
(
!
get_modref
(
module
))
ret
=
STATUS_DLL_NOT_FOUND
;
else
if
((
exports
=
RtlImageDirectoryEntryToData
(
module
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_EXPORT
,
&
exp_size
)))
{
void
*
proc
=
name
?
find_named_export
(
module
,
exports
,
exp_size
,
name
->
Buffer
,
-
1
)
...
...
@@ -1192,11 +1194,6 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
ret
=
STATUS_SUCCESS
;
}
}
else
{
/* check if the module itself is invalid to return the proper error */
if
(
!
get_modref
(
module
))
ret
=
STATUS_DLL_NOT_FOUND
;
}
RtlLeaveCriticalSection
(
&
loader_section
);
return
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment