Alexandre Julliard : userenv: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Alexandre Julliard
julliard at winehq.org
Wed May 8 18:22:48 CDT 2019
Module: wine
Branch: master
Commit: 3c53e06b7bfa7aaccd068e910185f23b788c83de
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3c53e06b7bfa7aaccd068e910185f23b788c83de
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed May 8 08:35:15 2019 -0500
userenv: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/userenv/userenv_main.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c
index 11a4f75..4a38c9a 100644
--- a/dlls/userenv/userenv_main.c
+++ b/dlls/userenv/userenv_main.c
@@ -111,15 +111,13 @@ static void set_registry_variables(WCHAR **env, HKEY hkey, DWORD type, BOOL set_
if (ret != ERROR_SUCCESS)
break;
- if (!memicmpW(name, SystemRootW, ARRAY_SIZE(SystemRootW)))
- continue;
- if (!memicmpW(name, SystemDriveW, ARRAY_SIZE(SystemDriveW)))
- continue;
+ if (!strcmpiW(name, SystemRootW)) continue;
+ if (!strcmpiW(name, SystemDriveW)) continue;
RtlInitUnicodeString(&us_name, name);
us_value.Buffer = value;
us_value.MaximumLength = sizeof(value);
- if (!memicmpW(name, PATHW, ARRAY_SIZE(PATHW)) &&
+ if (!strncmpiW(name, PATHW, ARRAY_SIZE(PATHW)) &&
!RtlQueryEnvironmentVariable_U(*env, &us_name, &us_value))
{
if (!set_path)
More information about the wine-cvs
mailing list