[2439] in Kerberos
Kerberos telnet bug fix
daemon@ATHENA.MIT.EDU (Joe Ramus)
Tue Dec 8 19:41:51 1992
Date: Tue, 8 Dec 92 13:37:45 PST
From: ramus@nersc.gov (Joe Ramus)
To: kerberos@Athena.MIT.EDU
The -k option on telnet did not work for me. I fixed a bug as shown
below. This might depend on the compiler. I use the new SUN unbundled
C compiler.
I think the char type was causing a zero value for dst_realm_sz into strncpy().
The global definition of dst_realm_sz in libtelnet/kerberos.c is int type.
This is in telnet/main.c:
#ifdef NERSC
/* original type of dst_realm_sz was a bug. */
extern char *dest_realm, dst_realm_buf[];
extern int dst_realm_sz;
#else
extern char *dest_realm, dst_realm_buf[], dst_realm_sz;
#endif
dest_realm = dst_realm_buf;
(void)strncpy(dest_realm, optarg, dst_realm_sz);
Joe Ramus NERSC Livermore (510) 423-8917 ramus@nersc.gov