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
ef95e4a8
Commit
ef95e4a8
authored
Mar 09, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Don't use wcsicmp/wcsnicmp() on the full Unicode character range.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1a9ddc37
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
file.c
dlls/kernelbase/file.c
+4
-1
path.c
dlls/kernelbase/path.c
+2
-1
registry.c
dlls/kernelbase/registry.c
+1
-1
string.c
dlls/kernelbase/string.c
+1
-1
No files found.
dlls/kernelbase/file.c
View file @
ef95e4a8
...
...
@@ -30,6 +30,7 @@
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winternl.h"
#include "winioctl.h"
#include "wincon.h"
...
...
@@ -183,7 +184,9 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path )
DWORD
dirlen
=
info
->
ulAssemblyDirectoryNameLength
/
sizeof
(
WCHAR
);
p
++
;
if
(
!
dirlen
||
wcsnicmp
(
p
,
info
->
lpAssemblyDirectoryName
,
dirlen
)
||
wcsicmp
(
p
+
dirlen
,
L".manifest"
))
if
(
!
dirlen
||
CompareStringOrdinal
(
p
,
dirlen
,
info
->
lpAssemblyDirectoryName
,
dirlen
,
TRUE
)
!=
CSTR_EQUAL
||
wcsicmp
(
p
+
dirlen
,
L".manifest"
))
{
/* manifest name does not match directory name, so it's not a global
* windows/winsxs manifest; use the manifest directory name instead */
...
...
dlls/kernelbase/path.c
View file @
ef95e4a8
...
...
@@ -2713,7 +2713,8 @@ BOOL WINAPI PathUnExpandEnvStringsW(const WCHAR *path, WCHAR *buffer, UINT buf_l
while
(
cur
->
var
)
{
/* path can't contain expanded value or value wasn't retrieved */
if
(
cur
->
len
==
0
||
cur
->
len
>
pathlen
||
wcsnicmp
(
cur
->
path
,
path
,
cur
->
len
))
if
(
cur
->
len
==
0
||
cur
->
len
>
pathlen
||
CompareStringOrdinal
(
cur
->
path
,
cur
->
len
,
path
,
cur
->
len
,
TRUE
)
!=
CSTR_EQUAL
)
{
cur
++
;
continue
;
...
...
dlls/kernelbase/registry.c
View file @
ef95e4a8
...
...
@@ -2551,7 +2551,7 @@ static int reg_mui_cache_get(const WCHAR *file_name, UINT index, WCHAR **buffer)
LIST_FOR_EACH_ENTRY
(
ent
,
&
reg_mui_cache
,
struct
mui_cache_entry
,
entry
)
{
if
(
ent
->
index
==
index
&&
ent
->
locale
==
GetThreadLocale
()
&&
!
wcsicmp
(
ent
->
file_name
,
file_name
))
!
lstrcmpiW
(
ent
->
file_name
,
file_name
))
goto
found
;
}
return
0
;
...
...
dlls/kernelbase/string.c
View file @
ef95e4a8
...
...
@@ -416,7 +416,7 @@ WCHAR * WINAPI StrStrNIW(const WCHAR *str, const WCHAR *search, UINT max_len)
for
(
i
=
max_len
;
*
str
&&
(
i
>
0
);
i
--
,
str
++
)
{
if
(
!
wcsnicmp
(
str
,
search
,
len
))
if
(
!
StrCmpNIW
(
str
,
search
,
len
))
return
(
WCHAR
*
)
str
;
}
...
...
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