diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-10-04 12:04:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:23 -0500 |
commit | 49dd5e4b1d8f0bcffa3fd8134e03d162a3507739 (patch) | |
tree | 6131bbc1cb1304dc1be22b32656896d179295bde /source4/libcli/auth | |
parent | c690be462d6dcfc8bdad6749ae055f11d810c89f (diff) | |
download | samba-49dd5e4b1d8f0bcffa3fd8134e03d162a3507739.tar.gz samba-49dd5e4b1d8f0bcffa3fd8134e03d162a3507739.tar.bz2 samba-49dd5e4b1d8f0bcffa3fd8134e03d162a3507739.zip |
r10712: Use data_blob_talloc, thanks to valgrind for finding the errors.
Andrew Bartlett
(This used to be commit 1f6fec8e6b0845ae6000eeda65641435fb18c9e3)
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r-- | source4/libcli/auth/smbencrypt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c index a9a7bb9903..b031bf4886 100644 --- a/source4/libcli/auth/smbencrypt.c +++ b/source4/libcli/auth/smbencrypt.c @@ -348,7 +348,7 @@ static DATA_BLOB NTLMv2_generate_response(TALLOC_CTX *out_mem_ctx, /* Given that data, and the challenge from the server, generate a response */ SMBOWFencrypt_ntv2(ntlm_v2_hash, server_chal, &ntlmv2_client_data, ntlmv2_response); - final_response = data_blob(out_mem_ctx, sizeof(ntlmv2_response) + ntlmv2_client_data.length); + final_response = data_blob_talloc(out_mem_ctx, NULL, sizeof(ntlmv2_response) + ntlmv2_client_data.length); memcpy(final_response.data, ntlmv2_response, sizeof(ntlmv2_response)); @@ -365,8 +365,8 @@ static DATA_BLOB LMv2_generate_response(TALLOC_CTX *mem_ctx, const DATA_BLOB *server_chal) { uint8_t lmv2_response[16]; - DATA_BLOB lmv2_client_data = data_blob(mem_ctx, 8); - DATA_BLOB final_response = data_blob(mem_ctx, 24); + DATA_BLOB lmv2_client_data = data_blob_talloc(mem_ctx, NULL, 8); + DATA_BLOB final_response = data_blob_talloc(mem_ctx, NULL,24); /* LMv2 */ /* client-supplied random data */ @@ -408,7 +408,7 @@ BOOL SMBNTLMv2encrypt_hash(TALLOC_CTX *mem_ctx, ntlm_v2_hash, server_chal, names_blob); if (user_session_key) { - *user_session_key = data_blob(mem_ctx, 16); + *user_session_key = data_blob_talloc(mem_ctx, NULL, 16); /* The NTLMv2 calculations also provide a session key, for signing etc later */ /* use only the first 16 bytes of nt_response for session key */ @@ -422,7 +422,7 @@ BOOL SMBNTLMv2encrypt_hash(TALLOC_CTX *mem_ctx, *lm_response = LMv2_generate_response(mem_ctx, ntlm_v2_hash, server_chal); if (lm_session_key) { - *lm_session_key = data_blob(mem_ctx, 16); + *lm_session_key = data_blob_talloc(mem_ctx, NULL, 16); /* The NTLMv2 calculations also provide a session key, for signing etc later */ /* use only the first 16 bytes of lm_response for session key */ |