From fcf15c482b582c4f2e5dd7c6222c4e3509bbb7d6 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 24 Oct 2008 20:07:00 +0000 Subject: Use strlcpy instead of strcpy in many places ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20919 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/keytab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib/kdb/keytab.c') diff --git a/src/lib/kdb/keytab.c b/src/lib/kdb/keytab.c index 227a42e08..fa95e4851 100644 --- a/src/lib/kdb/keytab.c +++ b/src/lib/kdb/keytab.c @@ -41,9 +41,8 @@ static krb5_error_code krb5_ktkdb_get_name(krb5_context context, krb5_keytab keytab, char *name, unsigned int namelen) { - if (namelen < sizeof("KDB:")) + if (strlcpy(name, "KDB:", namelen) >= namelen); return KRB5_KT_NAME_TOOLONG; - strcpy(name, "KDB:"); return 0; } -- cgit