VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/Ntvol.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-14 17:16:07 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-19 01:12:19 +0200
commit6674fb4401c6f28b9a6db1558aea6379744445b0 (patch)
treea723a42c5786ae6c9bfcf028ff25f50cd85629b9 /src/Driver/Ntvol.c
parentf45dba14bed2c67f7aa79957fdeadb7f74cb6d10 (diff)
downloadVeraCrypt-6674fb4401c6f28b9a6db1558aea6379744445b0.tar.gz
VeraCrypt-6674fb4401c6f28b9a6db1558aea6379744445b0.zip
Windows Driver: remove dependency to wcsstr by using simple memcmp comparison
Diffstat (limited to 'src/Driver/Ntvol.c')
-rw-r--r--src/Driver/Ntvol.c2
1 files changed, 1 insertions, 1 deletions
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,