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
4d93bafe
Commit
4d93bafe
authored
Mar 27, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use RtlEqualUnicodeString() instead of strcmpiW().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f831b3bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
actctx.c
dlls/ntdll/actctx.c
+10
-8
loader.c
dlls/ntdll/loader.c
+5
-2
No files found.
dlls/ntdll/actctx.c
View file @
4d93bafe
...
...
@@ -1002,7 +1002,7 @@ static void free_entity_array(struct entity_array *array)
static
BOOL
is_matching_string
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
)
{
if
(
!
str1
)
return
!
str2
;
return
str2
&&
!
strcmpiW
(
str1
,
str2
);
return
str2
&&
!
RtlCompareUnicodeStrings
(
str1
,
strlenW
(
str1
),
str2
,
strlenW
(
str2
),
TRUE
);
}
static
BOOL
is_matching_identity
(
const
struct
assembly_identity
*
id1
,
...
...
@@ -1012,7 +1012,7 @@ static BOOL is_matching_identity( const struct assembly_identity *id1,
if
(
!
is_matching_string
(
id1
->
arch
,
id2
->
arch
))
return
FALSE
;
if
(
!
is_matching_string
(
id1
->
public_key
,
id2
->
public_key
))
return
FALSE
;
if
(
id1
->
language
&&
id2
->
language
&&
strcmpiW
(
id1
->
language
,
id2
->
language
))
if
(
id1
->
language
&&
id2
->
language
&&
!
is_matching_string
(
id1
->
language
,
id2
->
language
))
{
if
(
strcmpW
(
wildcardW
,
id1
->
language
)
&&
strcmpW
(
wildcardW
,
id2
->
language
))
return
FALSE
;
...
...
@@ -3479,6 +3479,7 @@ static NTSTATUS build_dllredirect_section(ACTIVATION_CONTEXT* actctx, struct str
static
struct
string_index
*
find_string_index
(
const
struct
strsection_header
*
section
,
const
UNICODE_STRING
*
name
)
{
struct
string_index
*
iter
,
*
index
=
NULL
;
UNICODE_STRING
str
;
ULONG
hash
=
0
,
i
;
RtlHashUnicodeString
(
name
,
TRUE
,
HASH_STRING_ALGORITHM_X65599
,
&
hash
);
...
...
@@ -3488,9 +3489,9 @@ static struct string_index *find_string_index(const struct strsection_header *se
{
if
(
iter
->
hash
==
hash
)
{
const
WCHAR
*
nameW
=
(
WCHAR
*
)((
BYTE
*
)
section
+
iter
->
name_offset
);
if
(
!
strcmpiW
(
nameW
,
name
->
Buffer
))
str
.
Buffer
=
(
WCHAR
*
)((
BYTE
*
)
section
+
iter
->
name_offset
);
str
.
Length
=
iter
->
name_len
;
if
(
RtlEqualUnicodeString
(
&
str
,
name
,
TRUE
))
{
index
=
iter
;
break
;
...
...
@@ -3724,6 +3725,7 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
{
struct
string_index
*
iter
,
*
index
=
NULL
;
struct
wndclass_redirect_data
*
class
;
UNICODE_STRING
str
;
ULONG
hash
;
int
i
;
...
...
@@ -3748,9 +3750,9 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
{
if
(
iter
->
hash
==
hash
)
{
const
WCHAR
*
nameW
=
(
WCHAR
*
)((
BYTE
*
)
actctx
->
wndclass_section
+
iter
->
name_offset
);
if
(
!
strcmpiW
(
nameW
,
name
->
Buffer
))
str
.
Buffer
=
(
WCHAR
*
)((
BYTE
*
)
actctx
->
wndclass_section
+
iter
->
name_offset
);
str
.
Length
=
iter
->
name_len
;
if
(
RtlEqualUnicodeString
(
&
str
,
name
,
TRUE
))
{
index
=
iter
;
break
;
...
...
dlls/ntdll/loader.c
View file @
4d93bafe
...
...
@@ -491,15 +491,18 @@ static WINE_MODREF *get_modref( HMODULE hmod )
static
WINE_MODREF
*
find_basename_module
(
LPCWSTR
name
)
{
PLIST_ENTRY
mark
,
entry
;
UNICODE_STRING
name_str
;
RtlInitUnicodeString
(
&
name_str
,
name
);
if
(
cached_modref
&&
!
strcmpiW
(
name
,
cached_modref
->
ldr
.
BaseDllName
.
Buffer
))
if
(
cached_modref
&&
RtlEqualUnicodeString
(
&
name_str
,
&
cached_modref
->
ldr
.
BaseDllName
,
TRUE
))
return
cached_modref
;
mark
=
&
NtCurrentTeb
()
->
Peb
->
LdrData
->
InLoadOrderModuleList
;
for
(
entry
=
mark
->
Flink
;
entry
!=
mark
;
entry
=
entry
->
Flink
)
{
LDR_MODULE
*
mod
=
CONTAINING_RECORD
(
entry
,
LDR_MODULE
,
InLoadOrderModuleList
);
if
(
!
strcmpiW
(
name
,
mod
->
BaseDllName
.
Buffer
))
if
(
RtlEqualUnicodeString
(
&
name_str
,
&
mod
->
BaseDllName
,
TRUE
))
{
cached_modref
=
CONTAINING_RECORD
(
mod
,
WINE_MODREF
,
ldr
);
return
cached_modref
;
...
...
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