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:
Love Hörnquist Åstrand
2008-12-11 05:01:20 +00:00
parent b35c56fff6
commit 92896a8aab

View File

@@ -45,7 +45,7 @@ gss_pseudo_random(OM_uint32 *minor_status,
gss_buffer_t prf_out)
{
struct _gss_context *ctx = (struct _gss_context *) context;
gssapi_mech_interface m = ctx->gc_mech;
gssapi_mech_interface m;
OM_uint32 major_status;
_mg_buffer_zero(prf_out);
@@ -56,6 +56,8 @@ gss_pseudo_random(OM_uint32 *minor_status,
return GSS_S_NO_CONTEXT;
}
m = ctx->gc_mech;
if (m->gm_pseudo_random == NULL)
return GSS_S_UNAVAILABLE;