Commit 44e48abc authored by Richard Levitte's avatar Richard Levitte
Browse files

Use memmove() instead of memcpy() on areas that may overlap.

Spotted by Nalin Dahyabhai <nalin@redhat.com>
parent f420de02
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ int ssl3_enc(SSL *s, int send)
	if ((s->session == NULL) || (ds == NULL) ||
		(enc == NULL))
		{
		memcpy(rec->data,rec->input,rec->length);
		memmove(rec->data,rec->input,rec->length);
		rec->input=rec->data;
		}
	else
+1 −1
Original line number Diff line number Diff line
@@ -464,7 +464,7 @@ int tls1_enc(SSL *s, int send)
	if ((s->session == NULL) || (ds == NULL) ||
		(enc == NULL))
		{
		memcpy(rec->data,rec->input,rec->length);
		memmove(rec->data,rec->input,rec->length);
		rec->input=rec->data;
		}
	else