mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00: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:
parent
d8316ddcfb
commit
ce357e0a0f
1 changed files with 1 additions and 1 deletions
|
@ -1069,7 +1069,7 @@ PeekNamedPipe(HANDLE hNamedPipe,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
/* Calculate the buffer space that we'll need and allocate it */
|
/* 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);
|
Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferSize);
|
||||||
if (Buffer == NULL)
|
if (Buffer == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue