Author: mjmartin
Date: Sat Jan 3 03:24:44 2009
New Revision: 38522
URL:
http://svn.reactos.org/svn/reactos?rev=38522&view=rev
Log:
- PeekNamedPipe: Fixed BufferSize calculation, as it is the size of the
FILE_PIPE_PEEK_BUFFER struct + the nBufferSize parameter passed from caller.
Modified:
trunk/reactos/dll/win32/kernel32/file/npipe.c
Modified: trunk/reactos/dll/win32/kernel32/file/npipe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/np…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/npipe.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/npipe.c [iso-8859-1] Sat Jan 3 03:24:44 2009
@@ -1069,7 +1069,7 @@
NTSTATUS Status;
/* Calculate the buffer space that we'll need and allocate it */
- BufferSize = nBufferSize + FIELD_OFFSET(FILE_PIPE_PEEK_BUFFER, Data[0]);
+ BufferSize = nBufferSize + sizeof(FILE_PIPE_PEEK_BUFFER);
Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferSize);
if (Buffer == NULL)
{