Skip to content
Browse files

windows: ensure that the ipc frame header is properly initialized

  • Loading branch information...
1 parent 1e0d25a commit 456f831389f30f5fcc35f1ce07d63a34e30f039a Igor Zinkovsky committed Oct 14, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/win/pipe.c
View
3 src/win/pipe.c
@@ -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;
@@ -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) >=

0 comments on commit 456f831

Please sign in to comment.
Something went wrong with that request. Please try again.