From: Theodore Tso Date: Sat, 16 Jul 1994 03:39:20 +0000 (+0000) Subject: Fix core dump caused by trying to free stack garbage. :-) X-Git-Tag: krb5-1.0-beta4.2~133 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d9b286523a8c470c42eeb532799179ba0b97861a;p=krb5.git Fix core dump caused by trying to free stack garbage. :-) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3984 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog new file mode 100644 index 000000000..27a5c412a --- /dev/null +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -0,0 +1,6 @@ +Fri Jul 15 23:36:50 1994 Theodore Y. Ts'o (tytso at tsx-11) + + * kerberos5.c (kerberos5_is): Avoid coredump caused by freeing of + an unitialized variable. Also make sure we don't try to free name + if it is NULL. + diff --git a/src/appl/telnet/libtelnet/kerberos5.c b/src/appl/telnet/libtelnet/kerberos5.c index 0bc45cc70..2fd745ad8 100644 --- a/src/appl/telnet/libtelnet/kerberos5.c +++ b/src/appl/telnet/libtelnet/kerberos5.c @@ -354,7 +354,6 @@ kerberos5_is(ap, data, cnt) printf("%s\r\n", errbuf); return; } - free(name); if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) { /* do ap_rep stuff here */ reply.ctime = authdat->authenticator->ctime; @@ -382,7 +381,8 @@ kerberos5_is(ap, data, cnt) } auth_finished(ap, AUTH_USER); - free(name); + if (name) + free(name); if (authdat->authenticator->subkey && authdat->authenticator->subkey->keytype == KEYTYPE_DES) { if (session_key.contents)