mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[CSRSRV] CsrCaptureArguments(): Tell the compiler the contents ClientCaptureBuffer points to has a volatile character.
See https://docs.microsoft.com/fr-fr/archive/blogs/itgoestoeleven/why-your-user-mode-pointer-captures-are-probably-broken for more details. Since the contents of ClientCaptureBuffer is in the shared memory, the client could modify it while it is being probed and captured, and so we have to avoid any potential compiler optimizations regarding the captured "Length = ClientCaptureBuffer->Size" and "PointerCount = ClientCaptureBuffer->PointerCount" values.
This commit is contained in:
parent
d7a632a094
commit
e3a7066279
1 changed files with 2 additions and 2 deletions
|
@ -848,7 +848,6 @@ CsrApiRequestThread(IN PVOID Parameter)
|
|||
/* Reply back to the API port now */
|
||||
ReplyMsg = NULL;
|
||||
ReplyPort = CsrApiPort;
|
||||
|
||||
CsrDereferenceThread(CsrThread);
|
||||
}
|
||||
else if (ReplyCode == CsrReplyPending)
|
||||
|
@ -1121,7 +1120,8 @@ CsrCaptureArguments(IN PCSR_THREAD CsrThread,
|
|||
IN PCSR_API_MESSAGE ApiMessage)
|
||||
{
|
||||
PCSR_PROCESS CsrProcess = CsrThread->Process;
|
||||
PCSR_CAPTURE_BUFFER ClientCaptureBuffer, ServerCaptureBuffer = NULL;
|
||||
volatile CSR_CAPTURE_BUFFER* ClientCaptureBuffer;
|
||||
PCSR_CAPTURE_BUFFER ServerCaptureBuffer = NULL;
|
||||
ULONG_PTR EndOfClientBuffer;
|
||||
SIZE_T SizeOfBufferThroughOffsetsArray;
|
||||
SIZE_T BufferDistance;
|
||||
|
|
Loading…
Reference in a new issue