From: Tom Yu Date: Mon, 21 Sep 1998 04:34:28 +0000 (+0000) Subject: * accept_sec_context.c (krb5_gss_accept_sec_context): Only free X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f99a03c4043c6fde1559106d4b7d1f5ee7db34c9;p=thirdparty%2Fkrb5.git * accept_sec_context.c (krb5_gss_accept_sec_context): Only free ap_req.data if it was allocated by kg2_parse_token(), otherwise we lose very badly trying to free the middle of a potentially malloc()'ed block, possibly coredumping. git-svn-id: svn://anonsvn.mit.edu/krb5/branches/marc-3des@10925 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index a852fe0015..156ef4e3a7 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,10 @@ +Mon Sep 21 00:32:28 1998 Tom Yu + + * accept_sec_context.c (krb5_gss_accept_sec_context): Only free + ap_req.data if it was allocated by kg2_parse_token(), otherwise we + lose very badly trying to free the middle of a potentially + malloc()'ed block, possibly coredumping. + Thu Sep 3 19:35:44 1998 Tom Yu * accept_sec_context.c (krb5_gss_accept_sec_context): Fix typo; diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c index d4e83cc64c..011016f41b 100644 --- a/src/lib/gssapi/krb5/accept_sec_context.c +++ b/src/lib/gssapi/krb5/accept_sec_context.c @@ -926,7 +926,7 @@ krb5_gss_accept_sec_context(minor_status, context_handle, krb5_free_principal(context, deleg_cred->princ); xfree(deleg_cred); } - if (ap_req.data) + if (ap_req.data && gsskrb5_vers == 2000) xfree(ap_req.data); if (ap_rep.data) xfree(ap_rep.data);