summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-07-29 10:13:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:43 -0500
commitf1a215f5cb174a0bfe50f288fbd998c8fabb0b63 (patch)
tree4e24f45fed38849fb21fcd232cd626de2fbb23c2 /source4
parent2de2ead42d93804d94407aaa92fc9dca4ed87129 (diff)
downloadsamba-f1a215f5cb174a0bfe50f288fbd998c8fabb0b63.tar.gz
samba-f1a215f5cb174a0bfe50f288fbd998c8fabb0b63.tar.bz2
samba-f1a215f5cb174a0bfe50f288fbd998c8fabb0b63.zip
r1604: Samba4 avoids memcpy() as much as possible - we don't need to make a copy here.
Andrew Bartlett (This used to be commit 9efc94eeafbf0eb4488c53a1456cc7026c937f9f)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/raw/smb_signing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index 20f8921acb..80615f2d72 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -143,7 +143,7 @@ BOOL check_signed_incoming_message(struct request_buffer *in, DATA_BLOB *mac_key
{
BOOL good;
uint8_t calc_md5_mac[16];
- uint8_t server_sent_mac[8];
+ uint8_t *server_sent_mac;
uint8_t sequence_buf[8];
struct MD5Context md5_ctx;
const size_t offset_end_of_sig = (HDR_SS_FIELD + 8);
@@ -166,7 +166,7 @@ BOOL check_signed_incoming_message(struct request_buffer *in, DATA_BLOB *mac_key
SIVAL(sequence_buf, 4, 0);
/* get a copy of the server-sent mac */
- memcpy(server_sent_mac, &in->hdr[HDR_SS_FIELD], sizeof(server_sent_mac));
+ server_sent_mac = &in->hdr[HDR_SS_FIELD];
/* Calculate the 16 byte MAC and place first 8 bytes into the field. */
MD5Init(&md5_ctx);