From: Aleksandar Andrejevic Date: Mon, 3 Feb 2014 17:25:55 +0000 (+0000) Subject: [NTDLL] X-Git-Tag: backups/0.3.17@66124~1365^2~95 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=02acc7677045f8e75c4e59b3b2594b8f5c548ad5;ds=sidebyside [NTDLL] Allocate enough space to hold the alignment padding of arguments in CsrAllocateCaptureBuffer. svn path=/branches/ntvdm/; revision=61961 --- diff --git a/dll/ntdll/csr/capture.c b/dll/ntdll/csr/capture.c index d22644b5992..0a779eca9f9 100644 --- a/dll/ntdll/csr/capture.c +++ b/dll/ntdll/csr/capture.c @@ -101,6 +101,9 @@ CsrAllocateCaptureBuffer(IN ULONG ArgumentCount, /* Align it to a 4-byte boundary */ BufferSize = (BufferSize + 3) & ~3; + /* Add the size of the alignment padding for each argument */ + BufferSize += ArgumentCount * 3; + /* Allocate memory from the port heap */ CaptureBuffer = RtlAllocateHeap(CsrPortHeap, HEAP_ZERO_MEMORY, BufferSize); if (CaptureBuffer == NULL) return NULL;