diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/smb_seal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c index 19092bd8c8..2e3e2f4ce3 100644 --- a/source3/libsmb/smb_seal.c +++ b/source3/libsmb/smb_seal.c @@ -93,10 +93,11 @@ NTSTATUS common_ntlm_decrypt_buffer(NTLMSSP_STATE *ntlmssp_state, char *buf) } memcpy(buf + 8, inbuf + 8 + NTLMSSP_SIG_SIZE, data_len); - SAFE_FREE(inbuf); /* Reset the length. */ - smb_setlen(buf, data_len + 4); + smb_setlen(buf, data_len + 4, inbuf); + + SAFE_FREE(inbuf); return NT_STATUS_OK; } @@ -203,7 +204,7 @@ static NTSTATUS common_gss_decrypt_buffer(struct smb_tran_enc_state_gss *gss_sta } memcpy(buf + 8, out_buf.value, out_buf.length); - smb_setlen(buf, out_buf.length + 4); + smb_setlen(buf, out_buf.length + 4, out_buf.value); gss_release_buffer(&minor, &out_buf); return NT_STATUS_OK; |