mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[IPV4] TCPMD5: Use memmove() instead of memcpy() because we have overlaps.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a80cc20da4
commit
354faf0977
1 changed files with 4 additions and 4 deletions
|
@ -938,10 +938,10 @@ int tcp_v4_md5_do_del(struct sock *sk, __be32 addr)
|
|||
tp->md5sig_info->alloced4 = 0;
|
||||
} else if (tp->md5sig_info->entries4 != i) {
|
||||
/* Need to do some manipulation */
|
||||
memcpy(&tp->md5sig_info->keys4[i],
|
||||
&tp->md5sig_info->keys4[i+1],
|
||||
(tp->md5sig_info->entries4 - i) *
|
||||
sizeof(struct tcp4_md5sig_key));
|
||||
memmove(&tp->md5sig_info->keys4[i],
|
||||
&tp->md5sig_info->keys4[i+1],
|
||||
(tp->md5sig_info->entries4 - i) *
|
||||
sizeof(struct tcp4_md5sig_key));
|
||||
}
|
||||
tcp_free_md5sig_pool();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue