1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows Driver: remove dependency to wcsstr by using simple memcmp comparison

This commit is contained in:
Mounir IDRASSI
2017-07-14 17:16:07 +02:00
parent f45dba14be
commit 6674fb4401

View File

@@ -793,7 +793,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
Extension->bRawDevice = bRawDevice; Extension->bRawDevice = bRawDevice;
memset (Extension->wszVolume, 0, sizeof (Extension->wszVolume)); 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 */ /* UNC path */
RtlStringCbPrintfW (Extension->wszVolume, RtlStringCbPrintfW (Extension->wszVolume,