mirror of
https://github.com/reactos/reactos.git
synced 2026-07-05 04:44:38 +08:00
- 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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user