提交 44e48abc 编写于 作者: R Richard Levitte

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

Spotted by Nalin Dahyabhai <nalin@redhat.com>
上级 f420de02
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册