From 6674fb4401c6f28b9a6db1558aea6379744445b0 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 14 Jul 2017 17:16:07 +0200 Subject: Windows Driver: remove dependency to wcsstr by using simple memcmp comparison --- src/Driver/Ntvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c index 23b1a1b7..c42f3197 100644 --- a/src/Driver/Ntvol.c +++ b/src/Driver/Ntvol.c @@ -793,7 +793,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, Extension->bRawDevice = bRawDevice; memset (Extension->wszVolume, 0, sizeof (Extension->wszVolume)); - if (wcsstr (pwszMountVolume, WIDE ("\\??\\UNC\\")) == pwszMountVolume) + if ((wcslen (pwszMountVolume) > 8) && (0 == memcmp (pwszMountVolume, WIDE ("\\??\\UNC\\"), 8 * sizeof (WCHAR)))) { /* UNC path */ RtlStringCbPrintfW (Extension->wszVolume, -- cgit v1.2.3