Cleanup
[cyrus-sasl.git] / mech_eap / export_name.c
index 66664ef..667849a 100644 (file)
@@ -37,5 +37,10 @@ gss_export_name(OM_uint32 *minor,
                 const gss_name_t input_name,
                 gss_buffer_t exported_name)
 {
+    if (input_name == GSS_C_NO_NAME) {
+        *minor = EINVAL;
+        return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME;
+    }
+
     return gssEapExportName(minor, input_name, exported_name, 0);
 }