diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-13 17:05:51 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-13 18:12:22 +0200 |
commit | 38206f16bd9008dc9bc6e180686fa1eac954f8b4 (patch) | |
tree | ab244e77870e0637641be1474f02cb05937c2fdd /source3/libsmb | |
parent | 90d95f34f317d590bcb762e52fa4b35a01af598b (diff) | |
download | samba-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.c | 6 |
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 */ |