From: Richard Levitte Date: Thu, 7 Jun 2001 04:42:34 +0000 (+0000) Subject: Use memmove() instead of memcpy() on areas that may overlap. X-Git-Tag: OpenSSL_0_9_6c~182^2~122 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=44e48abc446cfe40784a234c65f91bbc5fd3841f;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 b27e9562b9..8cd36a395c 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -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 diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 3077e9b9b9..5f0976f9e7 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -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