Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
0bbbf016
Commit
0bbbf016
authored
Mar 31, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Return system dir path for PE mapping bootstrap placeholders.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
42de71c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
loader.c
dlls/ntdll/loader.c
+15
-4
No files found.
dlls/ntdll/loader.c
View file @
0bbbf016
...
...
@@ -2577,10 +2577,10 @@ static NTSTATUS find_builtin_without_file( const WCHAR *name, UNICODE_STRING *ne
RtlAppendUnicodeToString
(
new_name
,
L"
\\
"
);
RtlAppendUnicodeToString
(
new_name
,
name
);
status
=
open_dll_file
(
new_name
,
pwm
,
mapping
,
image_info
,
id
);
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
return
status
;
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
RtlAppendUnicodeToString
(
new_name
,
L".fake"
);
status
=
open_dll_file
(
new_name
,
pwm
,
mapping
,
image_info
,
id
);
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
return
status
;
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
RtlFreeUnicodeString
(
new_name
);
}
for
(
i
=
0
;
;
i
++
)
...
...
@@ -2592,16 +2592,27 @@ static NTSTATUS find_builtin_without_file( const WCHAR *name, UNICODE_STRING *ne
RtlAppendUnicodeToString
(
new_name
,
name
);
status
=
open_dll_file
(
new_name
,
pwm
,
mapping
,
image_info
,
id
);
if
(
status
==
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
)
found_image
=
TRUE
;
else
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
return
status
;
else
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
new_name
->
Length
=
len
;
RtlAppendUnicodeToString
(
new_name
,
L"
\\
fakedlls
\\
"
);
RtlAppendUnicodeToString
(
new_name
,
name
);
status
=
open_dll_file
(
new_name
,
pwm
,
mapping
,
image_info
,
id
);
if
(
status
==
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
)
found_image
=
TRUE
;
else
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
return
status
;
else
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
RtlFreeUnicodeString
(
new_name
);
}
if
(
found_image
)
status
=
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
;
done:
RtlFreeUnicodeString
(
new_name
);
if
(
!
status
)
{
new_name
->
Length
=
(
4
+
wcslen
(
system_dir
)
+
wcslen
(
name
))
*
sizeof
(
WCHAR
);
new_name
->
Buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
new_name
->
Length
+
sizeof
(
WCHAR
)
);
wcscpy
(
new_name
->
Buffer
,
L"
\\
??
\\
"
);
wcscat
(
new_name
->
Buffer
,
system_dir
);
wcscat
(
new_name
->
Buffer
,
name
);
}
return
status
;
}
...
...
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