From e91da1458dc8d361f84dde5406e1a587608cb16e Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Mon, 22 May 2006 12:02:13 +0100 Subject: [PATCH] rpcrt4: Authentication padding should only be generated if there is authentication data. --- dlls/rpcrt4/rpc_message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index f18cd4724c9..e19735d11f7 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -281,7 +281,7 @@ static RPC_STATUS RPCRT4_SendAuth(RpcConnection *Connection, RpcPktHdr *Header, Header->common.flags |= RPC_FLG_FIRST; Header->common.flags &= ~RPC_FLG_LAST; while (!(Header->common.flags & RPC_FLG_LAST)) { - unsigned char auth_pad_len = ROUND_UP_AMOUNT(BufferLength, AUTH_ALIGNMENT); + unsigned char auth_pad_len = AuthLength ? ROUND_UP_AMOUNT(BufferLength, AUTH_ALIGNMENT) : 0; unsigned short pkt_size = BufferLength + hdr_size + alen + auth_pad_len; /* decide if we need to split the packet into fragments */