Use memmove() instead of memcpy() on areas that may overlap.
Spotted by Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
f420de027f
commit
44e48abc44
@ -363,7 +363,7 @@ int ssl3_enc(SSL *s, int send)
|
|||||||
if ((s->session == NULL) || (ds == NULL) ||
|
if ((s->session == NULL) || (ds == NULL) ||
|
||||||
(enc == NULL))
|
(enc == NULL))
|
||||||
{
|
{
|
||||||
memcpy(rec->data,rec->input,rec->length);
|
memmove(rec->data,rec->input,rec->length);
|
||||||
rec->input=rec->data;
|
rec->input=rec->data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -464,7 +464,7 @@ int tls1_enc(SSL *s, int send)
|
|||||||
if ((s->session == NULL) || (ds == NULL) ||
|
if ((s->session == NULL) || (ds == NULL) ||
|
||||||
(enc == NULL))
|
(enc == NULL))
|
||||||
{
|
{
|
||||||
memcpy(rec->data,rec->input,rec->length);
|
memmove(rec->data,rec->input,rec->length);
|
||||||
rec->input=rec->data;
|
rec->input=rec->data;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user