summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 17:05:51 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-13 18:12:22 +0200
commit38206f16bd9008dc9bc6e180686fa1eac954f8b4 (patch)
treeab244e77870e0637641be1474f02cb05937c2fdd /source3/libsmb
parent90d95f34f317d590bcb762e52fa4b35a01af598b (diff)
downloadsamba-38206f16bd9008dc9bc6e180686fa1eac954f8b4.tar.gz
samba-38206f16bd9008dc9bc6e180686fa1eac954f8b4.tar.bz2
samba-38206f16bd9008dc9bc6e180686fa1eac954f8b4.zip
s3:libsmb: make sure cli->max_mux is valid in the return of the server
metze
Diffstat (limited to 'source3/libsmb')
-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 */