check that ctx is not a null ptr before deref cid#130
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24114 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -37,7 +37,7 @@ gss_get_mic(OM_uint32 *minor_status,
|
|||||||
gss_buffer_t message_token)
|
gss_buffer_t message_token)
|
||||||
{
|
{
|
||||||
struct _gss_context *ctx = (struct _gss_context *) context_handle;
|
struct _gss_context *ctx = (struct _gss_context *) context_handle;
|
||||||
gssapi_mech_interface m = ctx->gc_mech;
|
gssapi_mech_interface m;
|
||||||
|
|
||||||
_mg_buffer_zero(message_token);
|
_mg_buffer_zero(message_token);
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
@@ -45,6 +45,8 @@ gss_get_mic(OM_uint32 *minor_status,
|
|||||||
return GSS_S_NO_CONTEXT;
|
return GSS_S_NO_CONTEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m = ctx->gc_mech;
|
||||||
|
|
||||||
return (m->gm_get_mic(minor_status, ctx->gc_ctx, qop_req,
|
return (m->gm_get_mic(minor_status, ctx->gc_ctx, qop_req,
|
||||||
message_buffer, message_token));
|
message_buffer, message_token));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user