diff options
author | Dan Robertson <drobertson@tripwire.com> | 2018-02-22 20:47:11 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-03-02 00:39:58 +0100 |
commit | b67ffaf518c971817b167b41bf6226cddfdcfd2f (patch) | |
tree | df67c70da9a3782b143514ec41a66a0dc952bd75 /source3 | |
parent | 426e4a5a20cff73a80d80b46f15826deac3f934f (diff) | |
download | samba-b67ffaf518c971817b167b41bf6226cddfdcfd2f.tar.gz |
libsmb: Use smb2 tcon if conn_protocol >= SMB2_02
When the connection protocol is SMB2 the tid from the smb1 member is
used instead of smb2 in cli_state_set_tid which often results in a null
deref.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13310
Signed-off-by: Dan Robertson <drobertson@tripwire.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clientgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 44afee1d4a0..2e4dd15ab62 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -371,7 +371,7 @@ uint32_t cli_state_set_tid(struct cli_state *cli, uint32_t tid) uint32_t ret; if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { ret = smb2cli_tcon_current_id(cli->smb2.tcon); - smb2cli_tcon_set_id(cli->smb1.tcon, tid); + smb2cli_tcon_set_id(cli->smb2.tcon, tid); } else { ret = smb1cli_tcon_current_id(cli->smb1.tcon); smb1cli_tcon_set_id(cli->smb1.tcon, tid); |