diff options
Diffstat (limited to 'crypto/kerberosIV/lib/krb/unparse_name.c')
-rw-r--r-- | crypto/kerberosIV/lib/krb/unparse_name.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/crypto/kerberosIV/lib/krb/unparse_name.c b/crypto/kerberosIV/lib/krb/unparse_name.c index 9d39f1d..36f0a71 100644 --- a/crypto/kerberosIV/lib/krb/unparse_name.c +++ b/crypto/kerberosIV/lib/krb/unparse_name.c @@ -14,12 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Kungliga Tekniska - * Högskolan and its contributors. - * - * 4. Neither the name of the Institute nor the names of its contributors + * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,7 +33,7 @@ #include "krb_locl.h" -RCSID("$Id: unparse_name.c,v 1.8 1998/06/09 19:25:28 joda Exp $"); +RCSID("$Id: unparse_name.c,v 1.10 1999/12/02 16:58:44 joda Exp $"); static void quote_string(char *quote, char *from, char *to) @@ -76,11 +71,11 @@ krb_unparse_name_long_r(char *name, char *instance, char *realm, krb_principal pr; memset(&pr, 0, sizeof(pr)); - strcpy_truncate(pr.name, name, sizeof(pr.name)); + strlcpy(pr.name, name, sizeof(pr.name)); if(instance) - strcpy_truncate(pr.instance, instance, sizeof(pr.instance)); + strlcpy(pr.instance, instance, sizeof(pr.instance)); if(realm) - strcpy_truncate(pr.realm, realm, sizeof(pr.realm)); + strlcpy(pr.realm, realm, sizeof(pr.realm)); return krb_unparse_name_r(&pr, fullname); } @@ -98,10 +93,10 @@ krb_unparse_name_long(char *name, char *instance, char *realm) krb_principal pr; memset(&pr, 0, sizeof(pr)); - strcpy_truncate(pr.name, name, sizeof(pr.name)); + strlcpy(pr.name, name, sizeof(pr.name)); if(instance) - strcpy_truncate(pr.instance, instance, sizeof(pr.instance)); + strlcpy(pr.instance, instance, sizeof(pr.instance)); if(realm) - strcpy_truncate(pr.realm, realm, sizeof(pr.realm)); + strlcpy(pr.realm, realm, sizeof(pr.realm)); return krb_unparse_name(&pr); } |