summaryrefslogtreecommitdiff
path: root/modules/pam_namespace/md5.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-09-19 09:33:00 +0000
committer <>2014-11-13 09:36:22 +0000
commitb1521c97e73b10469f7b34c0571d51c647eca83c (patch)
tree212a6a00baa11e9d0ca7bc27b12420d1dce6f07c /modules/pam_namespace/md5.c
parent6e36ca00ed774a7c5b2f2322c96b023999b733a4 (diff)
downloadlinux-pam-b1521c97e73b10469f7b34c0571d51c647eca83c.tar.gz
Imported from /home/lorry/working-area/delta_linux-pam/Linux-PAM-1.1.8.tar.bz2.HEADLinux-PAM-1.1.8master
Diffstat (limited to 'modules/pam_namespace/md5.c')
-rw-r--r--modules/pam_namespace/md5.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/pam_namespace/md5.c b/modules/pam_namespace/md5.c
index c79fb35..dc95ab1 100644
--- a/modules/pam_namespace/md5.c
+++ b/modules/pam_namespace/md5.c
@@ -107,7 +107,7 @@ void MD5Name(MD5Update)(struct MD5Context *ctx, unsigned const char *buf, unsign
}
/*
- * Final wrapup - pad to 64-byte boundary with the bit pattern
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
void MD5Name(MD5Final)(unsigned char digest[16], struct MD5Context *ctx)
@@ -142,8 +142,7 @@ void MD5Name(MD5Final)(unsigned char digest[16], struct MD5Context *ctx)
byteReverse(ctx->in, 14);
/* Append length in bits and transform */
- ((uint32 *) ctx->in)[14] = ctx->bits[0];
- ((uint32 *) ctx->in)[15] = ctx->bits[1];
+ memcpy((uint32 *)ctx->in + 14, ctx->bits, 2*sizeof(uint32));
MD5Name(MD5Transform)(ctx->buf, (uint32 *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);