mirror of
https://github.com/reactos/reactos.git
synced 2025-05-11 13:27:47 +00:00
[BASESRV] Fix the BNO string buffer usage
This avoids reinitializing it before use.
This commit is contained in:
parent
25198d5cbd
commit
a802726577
1 changed files with 4 additions and 4 deletions
|
@ -290,7 +290,8 @@ BaseInitializeStaticServerData(IN PCSR_SERVER_DLL LoadedServerDll)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
BOOLEAN Success;
|
BOOLEAN Success;
|
||||||
WCHAR Buffer[MAX_PATH];
|
WCHAR BnoBuffer[100];
|
||||||
|
WCHAR Buffer[100];
|
||||||
PWCHAR HeapBuffer;
|
PWCHAR HeapBuffer;
|
||||||
UNICODE_STRING SystemRootString;
|
UNICODE_STRING SystemRootString;
|
||||||
UNICODE_STRING UnexpandedSystemRootString = RTL_CONSTANT_STRING(L"%SystemRoot%");
|
UNICODE_STRING UnexpandedSystemRootString = RTL_CONSTANT_STRING(L"%SystemRoot%");
|
||||||
|
@ -353,8 +354,8 @@ BaseInitializeStaticServerData(IN PCSR_SERVER_DLL LoadedServerDll)
|
||||||
ASSERT(Success);
|
ASSERT(Success);
|
||||||
|
|
||||||
/* FIXME: Check Session ID */
|
/* FIXME: Check Session ID */
|
||||||
wcscpy(Buffer, L"\\BaseNamedObjects");
|
wcscpy(BnoBuffer, L"\\BaseNamedObjects");
|
||||||
RtlInitUnicodeString(&BnoString, Buffer);
|
RtlInitUnicodeString(&BnoString, BnoBuffer);
|
||||||
|
|
||||||
/* Allocate the server data */
|
/* Allocate the server data */
|
||||||
BaseStaticServerData = RtlAllocateHeap(BaseSrvSharedHeap,
|
BaseStaticServerData = RtlAllocateHeap(BaseSrvSharedHeap,
|
||||||
|
@ -474,7 +475,6 @@ BaseInitializeStaticServerData(IN PCSR_SERVER_DLL LoadedServerDll)
|
||||||
ASSERT(NT_SUCCESS(Status));
|
ASSERT(NT_SUCCESS(Status));
|
||||||
|
|
||||||
/* Create the BNO directory */
|
/* Create the BNO directory */
|
||||||
RtlInitUnicodeString(&BnoString, L"\\BaseNamedObjects");
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&BnoString,
|
&BnoString,
|
||||||
OBJ_OPENIF | OBJ_PERMANENT | OBJ_CASE_INSENSITIVE,
|
OBJ_OPENIF | OBJ_PERMANENT | OBJ_CASE_INSENSITIVE,
|
||||||
|
|
Loading…
Reference in a new issue