aboutsummaryrefslogtreecommitdiff
path: root/lib/libgssapi/gss_verify_mic.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libgssapi/gss_verify_mic.c')
-rw-r--r--lib/libgssapi/gss_verify_mic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libgssapi/gss_verify_mic.c b/lib/libgssapi/gss_verify_mic.c
index 4e11ab1e08fc..fa3d68d035fe 100644
--- a/lib/libgssapi/gss_verify_mic.c
+++ b/lib/libgssapi/gss_verify_mic.c
@@ -41,6 +41,13 @@ gss_verify_mic(OM_uint32 *minor_status,
struct _gss_context *ctx = (struct _gss_context *) context_handle;
struct _gss_mech_switch *m = ctx->gc_mech;
+ if (qop_state)
+ *qop_state = 0;
+ if (ctx == NULL) {
+ *minor_status = 0;
+ return (GSS_S_NO_CONTEXT);
+ }
+
return (m->gm_verify_mic(minor_status, ctx->gc_ctx,
message_buffer, token_buffer, qop_state));
}