Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 354faf09 authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller
Browse files

[IPV4] TCPMD5: Use memmove() instead of memcpy() because we have overlaps.

parent a80cc20d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -938,7 +938,7 @@ 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],
				memmove(&tp->md5sig_info->keys4[i],
					&tp->md5sig_info->keys4[i+1],
					(tp->md5sig_info->entries4 - i) *
					 sizeof(struct tcp4_md5sig_key));