summaryrefslogtreecommitdiff
path: root/kerberosIV/krb/get_ad_tkt.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1997-12-12 05:30:35 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1997-12-12 05:30:35 +0000
commiteaf036b10d59d4a3ed4c0374ecd429610c80b2f9 (patch)
tree7e5f616bc347f6e420e75a57b6720fb0cbdcde1c /kerberosIV/krb/get_ad_tkt.c
parent38e69210c9cb774ff8ff883f1c83317a96ef9203 (diff)
Another upgrade of kth-krb + many fixes of strcpys and unchecked pointers.
Diffstat (limited to 'kerberosIV/krb/get_ad_tkt.c')
-rw-r--r--kerberosIV/krb/get_ad_tkt.c7
1 files changed, 4 insertions, 3 deletions
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)