Fix core dump caused by trying to free stack garbage. :-)
authorTheodore Tso <tytso@mit.edu>
Sat, 16 Jul 1994 03:39:20 +0000 (03:39 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 16 Jul 1994 03:39:20 +0000 (03:39 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3984 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/telnet/libtelnet/ChangeLog [new file with mode: 0644]
src/appl/telnet/libtelnet/kerberos5.c

diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog
new file mode 100644 (file)
index 0000000..27a5c41
--- /dev/null
@@ -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.
+
index 0bc45cc70cd1d0ab5e0c7c238321ece953400b6e..2fd745ad8478e6aa2893eb86055ed4fec1064bea 100644 (file)
@@ -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)