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
6fc259a5
Commit
6fc259a5
authored
May 08, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ddac3dcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
actctx.c
dlls/ntdll/actctx.c
+1
-1
directory.c
dlls/ntdll/directory.c
+5
-5
No files found.
dlls/ntdll/actctx.c
View file @
6fc259a5
...
...
@@ -3144,7 +3144,7 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
tmp
=
strchrW
(
tmp
,
'_'
)
+
1
;
tmp
=
strchrW
(
tmp
,
'_'
)
+
1
;
if
(
dir_info
->
FileNameLength
-
(
tmp
-
dir_info
->
FileName
)
*
sizeof
(
WCHAR
)
==
sizeof
(
wine_trailerW
)
&&
!
memicmp
W
(
tmp
,
wine_trailerW
,
ARRAY_SIZE
(
wine_trailerW
)))
!
strncmpi
W
(
tmp
,
wine_trailerW
,
ARRAY_SIZE
(
wine_trailerW
)))
{
/* prefer a non-Wine manifest if we already have one */
/* we'll still load the builtin dll if specified through DllOverrides */
...
...
dlls/ntdll/directory.c
View file @
6fc259a5
...
...
@@ -2101,7 +2101,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
{
ret
=
ntdll_umbstowcs
(
0
,
kde
[
1
].
d_name
,
strlen
(
kde
[
1
].
d_name
),
buffer
,
MAX_DIR_ENTRY_LEN
);
if
(
ret
==
length
&&
!
memicmp
W
(
buffer
,
name
,
length
))
if
(
ret
==
length
&&
!
strncmpi
W
(
buffer
,
name
,
length
))
{
strcpy
(
unix_name
+
pos
,
kde
[
1
].
d_name
);
RtlLeaveCriticalSection
(
&
dir_section
);
...
...
@@ -2111,7 +2111,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
}
ret
=
ntdll_umbstowcs
(
0
,
kde
[
0
].
d_name
,
strlen
(
kde
[
0
].
d_name
),
buffer
,
MAX_DIR_ENTRY_LEN
);
if
(
ret
==
length
&&
!
memicmp
W
(
buffer
,
name
,
length
))
if
(
ret
==
length
&&
!
strncmpi
W
(
buffer
,
name
,
length
))
{
strcpy
(
unix_name
+
pos
,
kde
[
1
].
d_name
[
0
]
?
kde
[
1
].
d_name
:
kde
[
0
].
d_name
);
...
...
@@ -2145,7 +2145,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
while
((
de
=
readdir
(
dir
)))
{
ret
=
ntdll_umbstowcs
(
0
,
de
->
d_name
,
strlen
(
de
->
d_name
),
buffer
,
MAX_DIR_ENTRY_LEN
);
if
(
ret
==
length
&&
!
memicmp
W
(
buffer
,
name
,
length
))
if
(
ret
==
length
&&
!
strncmpi
W
(
buffer
,
name
,
length
))
{
strcpy
(
unix_name
+
pos
,
de
->
d_name
);
closedir
(
dir
);
...
...
@@ -2159,7 +2159,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
{
WCHAR
short_nameW
[
12
];
ret
=
hash_short_file_name
(
&
str
,
short_nameW
);
if
(
ret
==
length
&&
!
memicmp
W
(
short_nameW
,
name
,
length
))
if
(
ret
==
length
&&
!
strncmpi
W
(
short_nameW
,
name
,
length
))
{
strcpy
(
unix_name
+
pos
,
de
->
d_name
);
closedir
(
dir
);
...
...
@@ -2468,7 +2468,7 @@ static inline int get_dos_prefix_len( const UNICODE_STRING *name )
return
ARRAY_SIZE
(
nt_prefixW
);
if
(
name
->
Length
>=
sizeof
(
dosdev_prefixW
)
&&
!
memicmp
W
(
name
->
Buffer
,
dosdev_prefixW
,
ARRAY_SIZE
(
dosdev_prefixW
)))
!
strncmpi
W
(
name
->
Buffer
,
dosdev_prefixW
,
ARRAY_SIZE
(
dosdev_prefixW
)))
return
ARRAY_SIZE
(
dosdev_prefixW
);
return
0
;
...
...
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