Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
windows: ensure that the ipc frame header is properly initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Zinkovsky committed Oct 14, 2011
1 parent 1e0d25a commit 456f831
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/win/pipe.c
Expand Up @@ -778,6 +778,8 @@ static int uv_pipe_write_impl(uv_loop_t* loop, uv_write_t* req,
memset(&req->overlapped, 0, sizeof(req->overlapped));

if (handle->ipc) {
ipc_frame.header.flags = 0;

/* Use the IPC framing protocol. */
if (send_handle) {
tcp_send_handle = (uv_tcp_t*)send_handle;
Expand Down Expand Up @@ -997,6 +999,7 @@ void uv_process_pipe_read_req(uv_loop_t* loop, uv_pipe_t* handle,
}

assert(bytes == sizeof(ipc_frame.header));
assert(ipc_frame.header.flags <= UV_IPC_UV_STREAM | UV_IPC_RAW_DATA);

if (ipc_frame.header.flags & UV_IPC_UV_STREAM) {
assert(avail - sizeof(ipc_frame.header) >=
Expand Down

0 comments on commit 456f831

Please sign in to comment.