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
3a02bc2e
Commit
3a02bc2e
authored
Apr 22, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Also check for builtin dll signature.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
510e7467
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
main.c
programs/winetest/main.c
+6
-2
No files found.
programs/winetest/main.c
View file @
3a02bc2e
...
...
@@ -295,6 +295,7 @@ static int running_elevated (void)
/* check for native dll when running under wine */
static
BOOL
is_native_dll
(
HMODULE
module
)
{
static
const
char
builtin_signature
[]
=
"Wine builtin DLL"
;
static
const
char
fakedll_signature
[]
=
"Wine placeholder DLL"
;
const
IMAGE_DOS_HEADER
*
dos
;
...
...
@@ -303,8 +304,11 @@ static BOOL is_native_dll( HMODULE module )
/* builtin dlls can't be loaded as datafile, so we must have native or fake dll */
dos
=
(
const
IMAGE_DOS_HEADER
*
)((
const
char
*
)
module
-
1
);
if
(
dos
->
e_magic
!=
IMAGE_DOS_SIGNATURE
)
return
FALSE
;
if
(
dos
->
e_lfanew
>=
sizeof
(
*
dos
)
+
sizeof
(
fakedll_signature
)
&&
!
memcmp
(
dos
+
1
,
fakedll_signature
,
sizeof
(
fakedll_signature
)
))
return
FALSE
;
if
(
dos
->
e_lfanew
>=
sizeof
(
*
dos
)
+
32
)
{
if
(
!
memcmp
(
dos
+
1
,
builtin_signature
,
sizeof
(
builtin_signature
)
))
return
FALSE
;
if
(
!
memcmp
(
dos
+
1
,
fakedll_signature
,
sizeof
(
fakedll_signature
)
))
return
FALSE
;
}
return
TRUE
;
}
...
...
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