Author: fireball
Date: Sat Jan 3 06:42:29 2009
New Revision: 38530
URL: http://svn.reactos.org/svn/reactos?rev=38530&view=rev
Log:
- Check if CompletionFilter has a valid value too.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Sat Jan 3 06:42:29 2009
@@ -1122,8 +1122,8 @@
/* Check if probing failed */
if (!NT_SUCCESS(Status)) return Status;
- /* Check if we have an correct parameter */
- if (!CompletionFilter)
+ /* Check if CompletionFilter is valid */
+ if (!CompletionFilter || (CompletionFilter & ~FILE_NOTIFY_VALID_MASK))
{
return STATUS_INVALID_PARAMETER;
}
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)
{