From 764cf334d6aa909a29cf21e4d9a90ce06209598a Mon Sep 17 00:00:00 2001 From: Dan Hipschman Date: Wed, 19 Mar 2008 15:03:00 -0700 Subject: [PATCH] rpcrt4: Use correct count in rpcrt4_conn_np_write. count is the total count passed into rpcrt4_conn_np_write. If WriteFile does a partial write it would end up writing too much subsequent times through the loop. All tests pass as before. --- dlls/rpcrt4/rpc_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index b02c11d49dd..822807b077a 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -392,7 +392,7 @@ static int rpcrt4_conn_np_write(RpcConnection *Connection, while (bytes_left) { DWORD bytes_written; - ret = WriteFile(npc->pipe, buf, count, &bytes_written, NULL); + ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, NULL); if (!ret || !bytes_written) break; bytes_left -= bytes_written;