From eaf036b10d59d4a3ed4c0374ecd429610c80b2f9 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Fri, 12 Dec 1997 05:30:35 +0000 Subject: Another upgrade of kth-krb + many fixes of strcpys and unchecked pointers. --- kerberosIV/krb/get_ad_tkt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'kerberosIV/krb/get_ad_tkt.c') diff --git a/kerberosIV/krb/get_ad_tkt.c b/kerberosIV/krb/get_ad_tkt.c index 54f8fc36cf3..c4cbe53256d 100644 --- a/kerberosIV/krb/get_ad_tkt.c +++ b/kerberosIV/krb/get_ad_tkt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: get_ad_tkt.c,v 1.3 1997/12/09 07:57:15 art Exp $ */ +/* $OpenBSD: get_ad_tkt.c,v 1.4 1997/12/12 05:30:20 art Exp $ */ /* $KTH: get_ad_tkt.c,v 1.16 1997/05/30 17:43:34 bg Exp $ */ /* @@ -94,9 +94,10 @@ get_ad_tkt(char *service, char *sinstance, char *realm, int lifetime) */ kerror = krb_get_cred(KRB_TICKET_GRANTING_TICKET, realm, realm, &cr); - if (kerror == KSUCCESS) + if (kerror == KSUCCESS) { strncpy(lrealm, realm, REALM_SZ); - else + lrealm[REALM_SZ - 1] = '\0'; + } else kerror = krb_get_tf_realm(TKT_FILE, lrealm); if (kerror != KSUCCESS) -- cgit v1.2.3