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
19e29d60
Commit
19e29d60
authored
Feb 20, 2006
by
Uwe Bonnes
Committed by
Alexandre Julliard
Feb 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Remove spaces at end of name in import_dll.
parent
42d6fe6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
loader.c
dlls/ntdll/loader.c
+7
-3
No files found.
dlls/ntdll/loader.c
View file @
19e29d60
...
...
@@ -449,7 +449,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
IMAGE_THUNK_DATA
*
thunk_list
;
WCHAR
buffer
[
32
];
const
char
*
name
=
get_rva
(
module
,
descr
->
Name
);
DWORD
len
=
strlen
(
name
)
+
1
;
DWORD
len
=
strlen
(
name
);
PVOID
protect_base
;
SIZE_T
protect_size
=
0
;
DWORD
protect_old
;
...
...
@@ -460,16 +460,20 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
else
import_list
=
thunk_list
;
if
(
len
*
sizeof
(
WCHAR
)
<=
sizeof
(
buffer
))
while
(
len
&&
name
[
len
-
1
]
==
' '
)
len
--
;
/* remove trailing spaces */
if
(
len
*
sizeof
(
WCHAR
)
<
sizeof
(
buffer
))
{
ascii_to_unicode
(
buffer
,
name
,
len
);
buffer
[
len
]
=
0
;
status
=
load_dll
(
load_path
,
buffer
,
0
,
&
wmImp
);
}
else
/* need to allocate a larger buffer */
{
WCHAR
*
ptr
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
WCHAR
*
ptr
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
!
ptr
)
return
NULL
;
ascii_to_unicode
(
ptr
,
name
,
len
);
ptr
[
len
]
=
0
;
status
=
load_dll
(
load_path
,
ptr
,
0
,
&
wmImp
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
ptr
);
}
...
...
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