diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-11-20 20:30:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-11-20 20:30:31 -0500 |
commit | 354faf0977397cea382e9e9c214fd028377d277b (patch) | |
tree | 5b3082736caaf676dcee2618db8cfb127a213f55 /net | |
parent | a80cc20da492d9a00b0851a6632dc03fed5d2e30 (diff) |
[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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index ff360968b910..652c32368ccc 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -938,10 +938,10 @@ int tcp_v4_md5_do_del(struct sock *sk, __be32 addr) | |||
938 | tp->md5sig_info->alloced4 = 0; | 938 | tp->md5sig_info->alloced4 = 0; |
939 | } else if (tp->md5sig_info->entries4 != i) { | 939 | } else if (tp->md5sig_info->entries4 != i) { |
940 | /* Need to do some manipulation */ | 940 | /* Need to do some manipulation */ |
941 | memcpy(&tp->md5sig_info->keys4[i], | 941 | memmove(&tp->md5sig_info->keys4[i], |
942 | &tp->md5sig_info->keys4[i+1], | 942 | &tp->md5sig_info->keys4[i+1], |
943 | (tp->md5sig_info->entries4 - i) * | 943 | (tp->md5sig_info->entries4 - i) * |
944 | sizeof(struct tcp4_md5sig_key)); | 944 | sizeof(struct tcp4_md5sig_key)); |
945 | } | 945 | } |
946 | tcp_free_md5sig_pool(); | 946 | tcp_free_md5sig_pool(); |
947 | return 0; | 947 | return 0; |