release the OID without smashing memory passed in by the application.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10117
dc483132-0cff-0310-8789-
dd5450dbe970
+Tue Jul 15 22:05:21 1997 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * init_sec_context.c (krb5_gss_init_sec_context): Always copy the
+ mechtype so that delete_sec_context() can safely release
+ the OID without smashing memory passed in by the application.
+
Mon Jun 30 14:05:51 1997 Kevin L Mitchell <klmitch@mit.edu>
* accept_sec_context.c: added code to return a valid delegated
/* fill in the ctx */
memset(ctx, 0, sizeof(krb5_gss_ctx_id_rec));
- ctx->mech_used = mech_type;
+ if (generic_gss_copy_oid(minor_status, mech_type, &ctx->mech_used)
+ != GSS_S_COMPLETE) {
+ free(ctx);
+ return (GSS_S_FAILURE);
+ }
ctx->auth_context = NULL;
ctx->initiate = 1;
ctx->gss_flags = KG_IMPLFLAGS(req_flags);