From: Richard Levitte Date: Thu, 7 Jun 2001 04:45:55 +0000 (+0000) Subject: Use memmove() instead of memcpy() on areas that may overlap. X-Git-Tag: OpenSSL_0_9_6b~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e90323844f5c65bbb321ec1143768dedfa92bad1;p=oweals%2Fopenssl.git Use memmove() instead of memcpy() on areas that may overlap. Spotted by Nalin Dahyabhai --- diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 9f52c39ca9..455a6f3d06 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -356,7 +356,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 diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index d10a23af8e..18e98602bc 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -420,7 +420,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