From e614bfbfaa0ee18b8a720a8dee12f355c0f26edb Mon Sep 17 00:00:00 2001 From: Geoffrey King Date: Mon, 17 Aug 1998 08:43:29 +0000 Subject: [PATCH] main.c (main): Declare dst_realm_sz as extern int instead of extern char, to agree with its definition in libtelnet/kerberos.c. This was causing dst_realm_sz to be zero unexpectedly, and so strncpy was not copying the -k realm argument into dest_realm. [krb5-appl/616] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10837 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/telnet/telnet/ChangeLog | 8 ++++++++ src/appl/telnet/telnet/main.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog index 3e582855f..03d0a8c3d 100644 --- a/src/appl/telnet/telnet/ChangeLog +++ b/src/appl/telnet/telnet/ChangeLog @@ -1,3 +1,11 @@ +Mon Aug 17 04:32:08 1998 Geoffrey King + + * main.c (main): Declare dst_realm_sz as extern int instead of + extern char, to agree with its definition in libtelnet/kerberos.c. + This was causing dst_realm_sz to be zero unexpectedly, and so + strncpy was not copying the -k realm argument into dest_realm. + [krb5-appl/616] + Tue May 26 15:27:55 1998 Tom Yu * configure.in: Re-order check for setupterm to avoid lossage if diff --git a/src/appl/telnet/telnet/main.c b/src/appl/telnet/telnet/main.c index 16663089f..da98ae6df 100644 --- a/src/appl/telnet/telnet/main.c +++ b/src/appl/telnet/telnet/main.c @@ -228,7 +228,8 @@ main(argc, argv) case 'k': #if defined(AUTHENTICATION) && defined(KRB4) { - extern char *dest_realm, dst_realm_buf[], dst_realm_sz; + extern char *dest_realm, dst_realm_buf[]; + extern int dst_realm_sz; dest_realm = dst_realm_buf; (void)strncpy(dest_realm, optarg, dst_realm_sz); } -- 2.26.2