aboutsummaryrefslogtreecommitdiff
path: root/lib/isc/md5.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isc/md5.c')
-rw-r--r--lib/isc/md5.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/isc/md5.c b/lib/isc/md5.c
index 7c6419b2a9c7..5d212502938b 100644
--- a/lib/isc/md5.c
+++ b/lib/isc/md5.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -217,11 +217,11 @@ isc_md5_update(isc_md5_t *ctx, const unsigned char *buf, unsigned int len) {
t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */
if (t > len) {
- memcpy((unsigned char *)ctx->in + 64 - t, buf, len);
+ memmove((unsigned char *)ctx->in + 64 - t, buf, len);
return;
}
/* First chunk is an odd size */
- memcpy((unsigned char *)ctx->in + 64 - t, buf, t);
+ memmove((unsigned char *)ctx->in + 64 - t, buf, t);
byteSwap(ctx->in, 16);
transform(ctx->buf, ctx->in);
buf += t;
@@ -229,7 +229,7 @@ isc_md5_update(isc_md5_t *ctx, const unsigned char *buf, unsigned int len) {
/* Process data in 64-byte chunks */
while (len >= 64) {
- memcpy(ctx->in, buf, 64);
+ memmove(ctx->in, buf, 64);
byteSwap(ctx->in, 16);
transform(ctx->buf, ctx->in);
buf += 64;
@@ -237,7 +237,7 @@ isc_md5_update(isc_md5_t *ctx, const unsigned char *buf, unsigned int len) {
}
/* Handle any remaining bytes of data. */
- memcpy(ctx->in, buf, len);
+ memmove(ctx->in, buf, len);
}
/*!
@@ -271,7 +271,7 @@ isc_md5_final(isc_md5_t *ctx, unsigned char *digest) {
transform(ctx->buf, ctx->in);
byteSwap(ctx->buf, 4);
- memcpy(digest, ctx->buf, 16);
+ memmove(digest, ctx->buf, 16);
memset(ctx, 0, sizeof(isc_md5_t)); /* In case it's sensitive */
}
#endif