- Fix a totally broken case when a directory has no name in ObQueryNameString. Spotted by Coverity.

svn path=/trunk/; revision=53535
This commit is contained in:
Aleksey Bragin
2011-09-02 21:22:30 +00:00
parent 180a02335c
commit 0f7db734e2
+5 -2
View File
@@ -1126,8 +1126,11 @@ ObQueryNameString(IN PVOID Object,
else
{
/* Directory without a name, we add "..." */
ObjectName -= sizeof(L"...");
ObjectName = L"...";
ObjectName = (PWCH)((ULONG_PTR)ObjectName -
sizeof(L"...") + sizeof(UNICODE_NULL));
RtlCopyMemory(ObjectName,
L"...",
sizeof(L"...") + sizeof(UNICODE_NULL));
break;
}
}