[ros-diffs] [mjmartin] 38522: - PeekNamedPipe: Fixed BufferSize calculation, as it is the size of the FILE_PIPE_PEEK_BUFFER struct + the nBufferSize parameter passed from caller.
mjmartin at svn.reactos.org
mjmartin at svn.reactos.org
Sat Jan 3 10:24:45 CET 2009
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/npipe.c?rev=38522&r1=38521&r2=38522&view=diff
==============================================================================
--- 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)
{
More information about the Ros-diffs
mailing list