From 3cd5f112cd2890c9647527335fbfb26d008c4ce0 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 22 Sep 2009 16:46:06 +0000 Subject: [PATCH] Fix a braino in r22782: we don't use strcpy even safely; use strlcpy instead. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22783 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/cli/kadmin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index d4bb2bfde..6f8c04b8e 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -1174,7 +1174,7 @@ prepare_dummy_password(char *buf, size_t sz) size_t i; /* Must try to pass any password policy in place, and be valid UTF-8. */ - strcpy(buf, "6F a["); + strlcpy(buf, "6F a[", sz); for (i = strlen(buf); i < sz - 1; i++) buf[i] = 'a' + (i % 26); buf[sz - 1] = '\0'; -- 2.26.2