summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-10-20 13:44:14 +0200
committerStefan Metzmacher <metze@samba.org>2011-10-21 08:43:01 +0200
commit12e257999b71e24fdc991adf80753421280cec79 (patch)
treefeb31d119a2c078060a2eeb314f388efef13d195
parent2a3bf9eb2fb2c8138162410d75f60c7b57bcf32a (diff)
downloadsamba-12e257999b71e24fdc991adf80753421280cec79.tar.gz
samba-12e257999b71e24fdc991adf80753421280cec79.tar.bz2
samba-12e257999b71e24fdc991adf80753421280cec79.zip
s3:libsmb/smb_seal: use plain malloc() in common_ntlm_encrypt_buffer()
metze
-rw-r--r--source3/libsmb/smb_seal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c
index d930523f86..935144dacc 100644
--- a/source3/libsmb/smb_seal.c
+++ b/source3/libsmb/smb_seal.c
@@ -24,6 +24,7 @@
#include "ntlmssp_wrap.h"
#include "libcli/auth/krb5_wrap.h"
+#undef malloc
/******************************************************************************
Pull out the encryption context for this packet. 0 means global context.
@@ -148,7 +149,11 @@ static NTSTATUS common_ntlm_encrypt_buffer(struct auth_ntlmssp_state *auth_ntlms
* check needed.
*/
- buf_out = SMB_XMALLOC_ARRAY(char, 8 + NTLMSSP_SIG_SIZE + data_len);
+ buf_out = (char *)malloc(8 + NTLMSSP_SIG_SIZE + data_len);
+ if (buf_out == NULL) {
+ TALLOC_FREE(frame);
+ return NT_STATUS_NO_MEMORY;
+ }
/* Copy the data from the original buffer. */
@@ -309,7 +314,7 @@ static NTSTATUS common_gss_encrypt_buffer(struct smb_tran_enc_state_gss *gss_sta
* bother :-*(. JRA.
*/
- *ppbuf_out = (char *)SMB_MALLOC(out_buf.length + 8); /* We know this can't wrap. */
+ *ppbuf_out = (char *)malloc(out_buf.length + 8); /* We know this can't wrap. */
if (!*ppbuf_out) {
gss_release_buffer(&minor, &out_buf);
return NT_STATUS_NO_MEMORY;