- PeekNamedPipe: Fixed BufferSize calculation, as it is the size of the FILE_PIPE_PEEK_BUFFER struct + the nBufferSize parameter passed from caller.

svn path=/trunk/; revision=38522
This commit is contained in:
Michael Martin 2009-01-03 09:24:44 +00:00
parent d8316ddcfb
commit ce357e0a0f

View file

@ -1069,7 +1069,7 @@ PeekNamedPipe(HANDLE hNamedPipe,
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)
{