diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-13 21:13:21 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-15 12:12:26 +0200 |
commit | 4a79d213c25c3708bbdb905ebc1e677ba50fe154 (patch) | |
tree | 5481eb1e7c755bd23d5adc247138463eedf03ba8 /source3/libsmb | |
parent | 18bec89b90a3f11d7020f170a54a4ecc0cc2187c (diff) | |
download | samba-4a79d213c25c3708bbdb905ebc1e677ba50fe154.tar.gz samba-4a79d213c25c3708bbdb905ebc1e677ba50fe154.tar.bz2 samba-4a79d213c25c3708bbdb905ebc1e677ba50fe154.zip |
s3:libsmb: make sure cli->secblob.length is 8 if we get a challenge
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 5449fcf312..77d122cf9c 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2690,7 +2690,7 @@ static void cli_negprot_done(struct tevent_req *subreq) if (server_capabilities & CAP_EXTENDED_SECURITY) { cli->secblob = data_blob(bytes, num_bytes); } else { - cli->secblob = data_blob(bytes, num_bytes); + cli->secblob = data_blob(bytes, MIN(num_bytes, 8)); /* work out if they sent us a workgroup */ if (num_bytes > 8) { ssize_t ret; @@ -2749,7 +2749,7 @@ static void cli_negprot_done(struct tevent_req *subreq) (char *)(vwv + 8), cli->serverzone); server_readbraw = ((SVAL(vwv + 5, 0) & 0x1) != 0); server_writebraw = ((SVAL(vwv + 5, 0) & 0x2) != 0); - cli->secblob = data_blob(bytes, num_bytes); + cli->secblob = data_blob(bytes, MIN(num_bytes, 8)); } else { /* the old core protocol */ cli->serverzone = get_time_zone(time(NULL)); |