check that ctx is not a null ptr before deref cid#140
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24110 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -45,7 +45,7 @@ gss_pseudo_random(OM_uint32 *minor_status,
|
|||||||
gss_buffer_t prf_out)
|
gss_buffer_t prf_out)
|
||||||
{
|
{
|
||||||
struct _gss_context *ctx = (struct _gss_context *) context;
|
struct _gss_context *ctx = (struct _gss_context *) context;
|
||||||
gssapi_mech_interface m = ctx->gc_mech;
|
gssapi_mech_interface m;
|
||||||
OM_uint32 major_status;
|
OM_uint32 major_status;
|
||||||
|
|
||||||
_mg_buffer_zero(prf_out);
|
_mg_buffer_zero(prf_out);
|
||||||
@@ -56,6 +56,8 @@ gss_pseudo_random(OM_uint32 *minor_status,
|
|||||||
return GSS_S_NO_CONTEXT;
|
return GSS_S_NO_CONTEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m = ctx->gc_mech;
|
||||||
|
|
||||||
if (m->gm_pseudo_random == NULL)
|
if (m->gm_pseudo_random == NULL)
|
||||||
return GSS_S_UNAVAILABLE;
|
return GSS_S_UNAVAILABLE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user