From dcfb1ce728a61cfd8d0de8bab8bb5519483b20d8 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 17 May 1990 11:54:49 +0000 Subject: [PATCH] change to * made sizeof() break. fixed git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@867 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ktdefname.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/krb5/os/ktdefname.c b/src/lib/krb5/os/ktdefname.c index b0ae656c7..167167e35 100644 --- a/src/lib/krb5/os/ktdefname.c +++ b/src/lib/krb5/os/ktdefname.c @@ -23,10 +23,6 @@ static char rcsid_ktdefname_c[] = #include #include -#ifndef min -#define min(a,b) ((a) < (b) ? (a) : (b)) -#endif - extern char *krb5_defkeyname; krb5_error_code @@ -34,8 +30,8 @@ krb5_kt_default_name(name, namesize) char *name; int namesize; { - strncpy(name, krb5_defkeyname, min(namesize, sizeof(krb5_defkeyname))); - if (namesize < sizeof(krb5_defkeyname)) + strncpy(name, krb5_defkeyname, namesize); + if (namesize < strlen(krb5_defkeyname)) return KRB5_CONFIG_NOTENUFSPACE; else return 0; -- 2.26.2