[NTOSKRNL] Properly compare position to name length in FsRtlIsNameInExpressionPrivate
authorBartosz Brachaczek <b.brachaczek@gmail.com>
Sun, 31 Mar 2019 09:32:57 +0000 (11:32 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 31 Mar 2019 09:44:00 +0000 (11:44 +0200)
CORE-15902

ntoskrnl/fsrtl/name.c

index 393815f..ae93490 100644 (file)
@@ -200,7 +200,7 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
                     DontSkipDot = TRUE;
                     if (!EndOfName && Name->Buffer[NamePosition] == '.')
                     {
-                        for (Position = NamePosition - 1; Position < Name->Length; Position++)
+                        for (Position = NamePosition - 1; Position < Name->Length / sizeof(WCHAR); Position++)
                         {
                             if (Name->Buffer[Position] == L'.')
                             {