summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/cliconnect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 09cca7f018..66c1937504 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2731,6 +2731,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli->sec_mode = 0;
cli->serverzone = get_time_zone(time(NULL));
cli->max_xmit = 1024;
+ cli->max_mux = 1;
}
if (cli->max_xmit < 1024) {
@@ -2738,6 +2739,11 @@ static void cli_negprot_done(struct tevent_req *subreq)
return;
}
+ if (cli->max_mux < 1) {
+ tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+ return;
+ }
+
cli->max_xmit = MIN(cli->max_xmit, CLI_BUFFER_SIZE);
/* a way to force ascii SMB */