summaryrefslogtreecommitdiff
path: root/source4/rpc_server/dcerpc_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server/dcerpc_server.c')
-rw-r--r--source4/rpc_server/dcerpc_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index b529e605c5..f2402605d9 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -636,7 +636,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
}
if (call->conn->cli_max_recv_frag == 0) {
- call->conn->cli_max_recv_frag = call->pkt.u.bind.max_recv_frag;
+ call->conn->cli_max_recv_frag = MIN(0x2000, call->pkt.u.bind.max_recv_frag);
}
if ((call->pkt.pfc_flags & DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN) &&
@@ -658,7 +658,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_BIND_ACK;
pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST | extra_flags;
- pkt.u.bind_ack.max_xmit_frag = 0x2000;
+ pkt.u.bind_ack.max_xmit_frag = call->conn->cli_max_recv_frag;
pkt.u.bind_ack.max_recv_frag = 0x2000;
/*