summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 16:02:16 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-13 18:12:22 +0200
commit53c0f001f25f7c9e1246ea46e66ee07997a34b03 (patch)
tree75265f393393b31f0a8c3f0c27cfbe2ae0335ab9
parent09547b24ff3862031e5c9a364fcdf0f3c6285bf8 (diff)
downloadsamba-53c0f001f25f7c9e1246ea46e66ee07997a34b03.tar.gz
samba-53c0f001f25f7c9e1246ea46e66ee07997a34b03.tar.bz2
samba-53c0f001f25f7c9e1246ea46e66ee07997a34b03.zip
s3:libsmb: check that max_xmit is not less than 1024
metze
-rw-r--r--source3/libsmb/cliconnect.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index cccb5f8bb4..09cca7f018 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2733,6 +2733,11 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli->max_xmit = 1024;
}
+ if (cli->max_xmit < 1024) {
+ 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 */