mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
libcli/smb: add missing struct smb2_signing_key allocation in smb2cli_session_set_channel_key()
This was missing in commit 17e22e020fcb84fb9ddda350915369dc9ea28ef1 and causes all multi-channel tests to segfault. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jun 11 15:25:56 UTC 2019 on sn-devel-184
This commit is contained in:
parent
1817db965d
commit
0875016654
@ -6302,6 +6302,15 @@ NTSTATUS smb2cli_session_set_channel_key(struct smbXcli_session *session,
|
||||
memcpy(channel_key, _channel_key.data,
|
||||
MIN(_channel_key.length, sizeof(channel_key)));
|
||||
|
||||
session->smb2_channel.signing_key = talloc_zero(session,
|
||||
struct smb2_signing_key);
|
||||
if (session->smb2_channel.signing_key == NULL) {
|
||||
ZERO_STRUCT(channel_key);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
talloc_set_destructor(session->smb2_channel.signing_key,
|
||||
smb2_signing_key_destructor);
|
||||
|
||||
session->smb2_channel.signing_key->blob =
|
||||
data_blob_talloc(session->smb2_channel.signing_key,
|
||||
channel_key,
|
||||
|
Loading…
x
Reference in New Issue
Block a user