mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
r22291: Fix off-by-one in tconX parsing.
Jeremy. (This used to be commit bc6ac4feac8c62cda2b6151eb648d3d5979e8a95)
This commit is contained in:
parent
e459831b5a
commit
2da54a66b9
@ -469,13 +469,22 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
|
||||
|
||||
if (global_encrypted_passwords_negotiated) {
|
||||
password = data_blob(smb_buf(inbuf),passlen);
|
||||
if (lp_security() == SEC_SHARE) {
|
||||
/*
|
||||
* Security = share always has a pad byte
|
||||
* after the password.
|
||||
*/
|
||||
p = smb_buf(inbuf) + passlen + 1;
|
||||
} else {
|
||||
p = smb_buf(inbuf) + passlen;
|
||||
}
|
||||
} else {
|
||||
password = data_blob(smb_buf(inbuf),passlen+1);
|
||||
/* Ensure correct termination */
|
||||
password.data[passlen]=0;
|
||||
password.data[passlen]=0;
|
||||
p = smb_buf(inbuf) + passlen + 1;
|
||||
}
|
||||
|
||||
p = smb_buf(inbuf) + passlen;
|
||||
p += srvstr_pull_buf(inbuf, path, p, sizeof(path), STR_TERMINATE);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user