diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-11-27 15:41:11 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-11-27 15:41:11 +0300 |
commit | 3fb42daaf11c4be8e0626b733916f3a7b65bcfae (patch) | |
tree | d40ab1904047d2db03c9f6e9b538e01d62415646 /net/sctp/auth.c | |
parent | efdbe3c3edb6c8c98a8be863f60916780a5375c1 (diff) | |
parent | 06a691e64b11323a735db3c3bd909d3c0712698f (diff) | |
download | linux-3fb42daaf11c4be8e0626b733916f3a7b65bcfae.tar.xz |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'net/sctp/auth.c')
-rw-r--r-- | net/sctp/auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 4f15b7d730e1..1543e39f47c3 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c @@ -809,8 +809,8 @@ int sctp_auth_ep_set_hmacs(struct sctp_endpoint *ep, if (!has_sha1) return -EINVAL; - memcpy(ep->auth_hmacs_list->hmac_ids, &hmacs->shmac_idents[0], - hmacs->shmac_num_idents * sizeof(__u16)); + for (i = 0; i < hmacs->shmac_num_idents; i++) + ep->auth_hmacs_list->hmac_ids[i] = htons(hmacs->shmac_idents[i]); ep->auth_hmacs_list->param_hdr.length = htons(sizeof(sctp_paramhdr_t) + hmacs->shmac_num_idents * sizeof(__u16)); return 0; |