X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=libraries%2Fliblutil%2Fmd5.c;h=a0f4ebd7a958b2a94f2cd3d30d5da00f7fc1ca32;hb=70792ad7a9fa962c98580f3a4c2a71d0aee982c0;hp=9ce509f8ffe13ab86436b802423dbd58d2bb4500;hpb=a56c161bdbc1443808039d0eaf9b84474a243352;p=openldap
diff --git a/libraries/liblutil/md5.c b/libraries/liblutil/md5.c
index 9ce509f8ff..a0f4ebd7a9 100644
--- a/libraries/liblutil/md5.c
+++ b/libraries/liblutil/md5.c
@@ -1,12 +1,21 @@
+/* md5.c -- MD5 message-digest algorithm */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software .
+ *
+ * Copyright 1998-2010 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * .
*/
-/*
- * Modified by Kurt D. Zeilenga for inclusion into OpenLDAP
- * I hereby disclaim copyright in any changes I have made; this
- * code remains in the public domain.
+/* This work was adapted for inclusion in OpenLDAP Software by
+ * Kurt D. Zeilenga based upon code developed by Colin Plumb
+ * and subsequently modified by Jim Kingdon.
*/
/*
@@ -110,10 +119,10 @@ lutil_MD5Update(
t = 64-t;
if (len < t) {
- memcpy(p, buf, len);
+ AC_MEMCPY(p, buf, len);
return;
}
- memcpy(p, buf, t);
+ AC_MEMCPY(p, buf, t);
lutil_MD5Transform(ctx->buf, ctx->in);
buf += t;
len -= t;
@@ -122,7 +131,7 @@ lutil_MD5Update(
/* Process data in 64-byte chunks */
while (len >= 64) {
- memcpy(ctx->in, buf, 64);
+ AC_MEMCPY(ctx->in, buf, 64);
lutil_MD5Transform(ctx->buf, ctx->in);
buf += 64;
len -= 64;
@@ -130,7 +139,7 @@ lutil_MD5Update(
/* Handle any remaining bytes of data. */
- memcpy(ctx->in, buf, len);
+ AC_MEMCPY(ctx->in, buf, len);
}
/*