Commit ef95e4a8 authored by Alexandre Julliard's avatar Alexandre Julliard

kernelbase: Don't use wcsicmp/wcsnicmp() on the full Unicode character range.

parent 1a9ddc37
......@@ -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 */
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment