Signed-off-by: Andrey Gusev andrey.goosev@gmail.com --- dlls/kernelbase/sync.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/kernelbase/sync.c b/dlls/kernelbase/sync.c index 31df6c7be8..bc35ff7c2a 100644 --- a/dlls/kernelbase/sync.c +++ b/dlls/kernelbase/sync.c @@ -1224,6 +1224,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH PeekNamedPipe( HANDLE pipe, LPVOID out_buffer, DWO IO_STATUS_BLOCK io; NTSTATUS status;
+ if (!buffer) return FALSE; + if (size && !(buffer = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( FILE_PIPE_PEEK_BUFFER, Data[size] )))) {