mirror of
https://github.com/samba-team/samba.git
synced 2025-03-03 12:58:35 +03:00
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)
This commit is contained in:
parent
2de2ead42d
commit
f1a215f5cb
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user