summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-11-14 10:05:13 +0100
committerKarolin Seeger <kseeger@samba.org>2014-12-08 10:16:13 +0100
commit8999acabfc3aaf9fcfecb4e71a2af96c74021a8d (patch)
tree2a5340b0df3b0cbe8ac609c3347e0050b55c9155 /source3
parent4051499d2cb0cbb737edc12da28d9e6656fb9f71 (diff)
downloadsamba-8999acabfc3aaf9fcfecb4e71a2af96c74021a8d.tar.gz
s3-libsmb: Duplicate the memory before we free it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> (cherry picked from commit 8c41795c81d85114e383e694ba7421e95bacb912)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/ntlmssp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 0a62b8b11b..617b34b497 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -422,9 +422,12 @@ static NTSTATUS ntlmssp3_client_challenge(struct ntlmssp_state *ntlmssp_state,
goto noccache;
}
- *next_request = data_blob(wbc_next->data, wbc_next->length);
- ntlmssp_state->session_key = data_blob(
- wbc_session_key->data, wbc_session_key->length);
+ *next_request = data_blob_talloc(ntlmssp_state,
+ wbc_next->data,
+ wbc_next->length);
+ ntlmssp_state->session_key = data_blob_talloc(ntlmssp_state,
+ wbc_session_key->data,
+ wbc_session_key->length);
wbcFreeMemory(info);
goto done;