Author: fireball
Date: Fri Sep 2 21:22:30 2011
New Revision: 53535
URL:
http://svn.reactos.org/svn/reactos?rev=53535&view=rev
Log:
- Fix a totally broken case when a directory has no name in ObQueryNameString. Spotted by
Coverity.
Modified:
trunk/reactos/ntoskrnl/ob/obname.c
Modified: trunk/reactos/ntoskrnl/ob/obname.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=5…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] Fri Sep 2 21:22:30 2011
@@ -1126,8 +1126,11 @@
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;
}
}