Commit e91da145 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

rpcrt4: Authentication padding should only be generated if there is authentication data.

parent 29d3f1e1
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment