Alexandre Julliard : advapi32: Use strncmpiW instead of memicmpW for strings without embedded nulls.

Alexandre Julliard julliard at winehq.org
Tue May 7 17:32:46 CDT 2019


Module: wine
Branch: master
Commit: 6e0a5b81a4f339e8691091c35bfb9df07b957aeb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6e0a5b81a4f339e8691091c35bfb9df07b957aeb

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May  7 11:30:29 2019 -0500

advapi32: Use strncmpiW instead of memicmpW for strings without embedded nulls.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/advapi32/registry.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 9a4c961..43ea3b3 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -108,7 +108,7 @@ static BOOL is_wow6432node( const UNICODE_STRING *name )
     static const WCHAR wow6432nodeW[] = {'W','o','w','6','4','3','2','N','o','d','e'};
 
     return (name->Length == sizeof(wow6432nodeW) &&
-            !memicmpW( name->Buffer, wow6432nodeW, ARRAY_SIZE( wow6432nodeW )));
+            !strncmpiW( name->Buffer, wow6432nodeW, ARRAY_SIZE( wow6432nodeW )));
 }
 
 /* open the Wow6432Node subkey of the specified key */
@@ -149,7 +149,7 @@ static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES
 
         /* don't try to create registry root */
         if (!attr->RootDirectory && len > ARRAY_SIZE( registry_root ) &&
-            !memicmpW( buffer, registry_root, ARRAY_SIZE( registry_root )))
+            !strncmpiW( buffer, registry_root, ARRAY_SIZE( registry_root )))
             i += ARRAY_SIZE( registry_root );
 
         while (i < len && buffer[i] != '\\') i++;




More information about the wine-cvs mailing list