Make ATTR_TYPE_MAX the highest attribute, not +1
[mech_eap.orig] / export_sec_context.c
index 92c42bc..50d4f5c 100644 (file)
@@ -41,7 +41,7 @@ gssEapExportPartialContext(OM_uint32 *minor,
     token->value = NULL;
 
     /*
-     * The format of this token awaits definition by libradsec.
+     * The format of this token awaits definition by libradius.
      */
     return GSS_S_COMPLETE;
 }
@@ -69,14 +69,14 @@ gssEapExportSecContext(OM_uint32 *minor,
     if (ctx->initiatorName != GSS_C_NO_NAME) {
         major = gssEapExportNameInternal(minor, ctx->initiatorName,
                                          &initiatorName,
-                                         EXPORT_NAME_FLAG_ATTRS);
+                                         EXPORT_NAME_FLAG_COMPOSITE);
         if (GSS_ERROR(major))
             goto cleanup;
     }
     if (ctx->acceptorName != GSS_C_NO_NAME) {
         major = gssEapExportNameInternal(minor, ctx->acceptorName,
                                          &acceptorName,
-                                         EXPORT_NAME_FLAG_ATTRS);
+                                         EXPORT_NAME_FLAG_COMPOSITE);
         if (GSS_ERROR(major))
             goto cleanup;
     }
@@ -159,6 +159,9 @@ gss_export_sec_context(OM_uint32 *minor,
     OM_uint32 major, tmpMinor;
     gss_ctx_id_t ctx = *context_handle;
 
+    interprocess_token->length = 0;
+    interprocess_token->value = NULL;
+
     if (ctx == GSS_C_NO_CONTEXT)
         return GSS_S_NO_CONTEXT;