Alexandre Julliard : netapi32: 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: ddac3dccc8930800e614f1507e77a876cee54abf
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ddac3dccc8930800e614f1507e77a876cee54abf
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed May 8 08:34:19 2019 -0500
netapi32: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/netapi32/netapi32.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c
index c765f36..d6554aa 100644
--- a/dlls/netapi32/netapi32.c
+++ b/dlls/netapi32/netapi32.c
@@ -3394,7 +3394,7 @@ DWORD WINAPI DavGetHTTPFromUNCPath(const WCHAR *unc_path, WCHAR *buf, DWORD *buf
{
p = ++q;
while (*p && (*p != '\\' && *p != '/' && *p != '@')) p++;
- if (p - q == 3 && !memicmpW( q, sslW, 3 ))
+ if (p - q == 3 && !strncmpiW( q, sslW, 3 ))
{
scheme = httpsW;
q = p;
@@ -3477,8 +3477,8 @@ DWORD WINAPI DavGetUNCFromHTTPPath(const WCHAR *http_path, WCHAR *buf, DWORD *bu
TRACE("(%s %p %p)\n", debugstr_w(http_path), buf, buflen);
while (*p && *p != ':') { p++; len++; };
- if (len == ARRAY_SIZE(httpW) && !memicmpW( http_path, httpW, len )) ssl = FALSE;
- else if (len == ARRAY_SIZE(httpsW) && !memicmpW( http_path, httpsW, len )) ssl = TRUE;
+ if (len == ARRAY_SIZE(httpW) && !strncmpiW( http_path, httpW, len )) ssl = FALSE;
+ else if (len == ARRAY_SIZE(httpsW) && !strncmpiW( http_path, httpsW, len )) ssl = TRUE;
else return ERROR_INVALID_PARAMETER;
if (p[0] != ':' || p[1] != '/' || p[2] != '/') return ERROR_INVALID_PARAMETER;
More information about the wine-cvs
mailing list