aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gnutls_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gnutls_io.c b/src/gnutls_io.c
index 753c87b..1505666 100644
--- a/src/gnutls_io.c
+++ b/src/gnutls_io.c
@@ -72,13 +72,13 @@ static int char_buffer_read(mgs_char_buffer_t * buffer, char *in,
72 72
73 if (buffer->length > inl) { 73 if (buffer->length > inl) {
74 /* we have have enough to fill the caller's buffer */ 74 /* we have have enough to fill the caller's buffer */
75 memcpy(in, buffer->value, inl); 75 memmove(in, buffer->value, inl);
76 buffer->value += inl; 76 buffer->value += inl;
77 buffer->length -= inl; 77 buffer->length -= inl;
78 } 78 }
79 else { 79 else {
80 /* swallow remainder of the buffer */ 80 /* swallow remainder of the buffer */
81 memcpy(in, buffer->value, buffer->length); 81 memmove(in, buffer->value, buffer->length);
82 inl = buffer->length; 82 inl = buffer->length;
83 buffer->value = NULL; 83 buffer->value = NULL;
84 buffer->length = 0; 84 buffer->length = 0;