diff options
Diffstat (limited to 'lib/libgssapi/gss_get_mic.c')
-rw-r--r-- | lib/libgssapi/gss_get_mic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libgssapi/gss_get_mic.c b/lib/libgssapi/gss_get_mic.c index a3495ecfe794..dff3b545f78f 100644 --- a/lib/libgssapi/gss_get_mic.c +++ b/lib/libgssapi/gss_get_mic.c @@ -30,6 +30,7 @@ #include "mech_switch.h" #include "context.h" +#include "utils.h" OM_uint32 gss_get_mic(OM_uint32 *minor_status, @@ -41,6 +42,12 @@ gss_get_mic(OM_uint32 *minor_status, struct _gss_context *ctx = (struct _gss_context *) context_handle; struct _gss_mech_switch *m = ctx->gc_mech; + _gss_buffer_zero(message_token); + if (ctx == NULL) { + *minor_status = 0; + return (GSS_S_NO_CONTEXT); + } + return (m->gm_get_mic(minor_status, ctx->gc_ctx, qop_req, message_buffer, message_token)); } |