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
70b8461b
Commit
70b8461b
authored
Jan 05, 2023
by
Ake Rehnman
Committed by
Alexandre Julliard
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Store path to module image when passed through file handle.
Co-authored-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
3055653c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
pe_module.c
dlls/dbghelp/pe_module.c
+27
-1
No files found.
dlls/dbghelp/pe_module.c
View file @
70b8461b
...
...
@@ -26,6 +26,8 @@
#include <string.h>
#include <assert.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "dbghelp_private.h"
#include "image_private.h"
#include "winternl.h"
...
...
@@ -796,7 +798,31 @@ struct module* pe_load_native_module(struct process* pcs, const WCHAR* name,
return
NULL
;
opened
=
TRUE
;
}
else
if
(
name
)
lstrcpyW
(
loaded_name
,
name
);
else
{
ULONG
sz
=
sizeof
(
OBJECT_NAME_INFORMATION
)
+
MAX_PATH
*
sizeof
(
WCHAR
),
needed
;
OBJECT_NAME_INFORMATION
*
obj_name
;
NTSTATUS
nts
;
obj_name
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sz
);
if
(
obj_name
)
{
nts
=
NtQueryObject
(
hFile
,
ObjectNameInformation
,
obj_name
,
sz
,
&
needed
);
if
(
nts
==
STATUS_BUFFER_OVERFLOW
)
{
sz
=
needed
;
obj_name
=
RtlReAllocateHeap
(
GetProcessHeap
(),
0
,
obj_name
,
sz
);
nts
=
NtQueryObject
(
hFile
,
ObjectNameInformation
,
obj_name
,
sz
,
&
needed
);
}
if
(
!
nts
)
{
obj_name
->
Name
.
Buffer
[
obj_name
->
Name
.
Length
/
sizeof
(
WCHAR
)]
=
L'\0'
;
real_path
=
wcsdup
(
obj_name
->
Name
.
Buffer
);
}
RtlFreeHeap
(
GetProcessHeap
(),
0
,
obj_name
);
}
if
(
name
)
lstrcpyW
(
loaded_name
,
name
);
}
if
(
!
(
modfmt
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
module_format
)
+
sizeof
(
struct
pe_module_info
))))
return
NULL
;
modfmt
->
u
.
pe_info
=
(
struct
pe_module_info
*
)(
modfmt
+
1
);
...
...
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