From 01173ec2426627dbb1e0d96c06c3ffa0b14d36d0 Mon Sep 17 00:00:00 2001
From: "Alan T. DeKok" <aland@freeradius.org>
Date: Thu, 21 May 2015 15:40:11 -0400
Subject: [PATCH] Use "length", which has been limited in size
---
src/pam_radius_auth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pam_radius_auth.c b/src/pam_radius_auth.c
index 7c7c9d9..396d1cf 100644
--- a/src/pam_radius_auth.c
+++ b/src/pam_radius_auth.c
@@ -536,7 +536,7 @@ static void add_password(AUTH_HDR *request, unsigned char type, CONST char *pass
} /* 16*N maps to itself */
memset(hashed, 0, length);
- memcpy(hashed, password, strlen(password));
+ memcpy(hashed, password, length);
attr = find_attribute(request, PW_PASSWORD);