From e9f4bef38cae47e5a788044a4aa88b0703e5ec54 Mon Sep 17 00:00:00 2001 From: Liryna Date: Fri, 13 May 2022 08:30:42 -0400 Subject: [PATCH] Kernel - Remove UNCName CaseInSensitive prefix during Create --- sys/create.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/create.c b/sys/create.c index fe7ec3b5..78c04368 100755 --- a/sys/create.c +++ b/sys/create.c @@ -630,7 +630,8 @@ Return Value: if (RequestContext->Dcb->UNCName != NULL) { UNICODE_STRING fileNameUS = DokanWrapUnicodeString(fileName, fileNameLength); - if (StartsWith(&fileNameUS, RequestContext->Dcb->UNCName)) { + if (RtlPrefixUnicodeString(RequestContext->Dcb->UNCName, &fileNameUS, + /*CaseInSensitive=*/TRUE)) { fileNameLength -= RequestContext->Dcb->UNCName->Length; if (fileNameLength == 0) { fileName[0] = '\\';