fix null pointer dereference errors
Change-Id: I82a849afe9f432a1084ad2505ce88b1fe4d3d3af
This commit is contained in:
10
kadmin/rpc.c
10
kadmin/rpc.c
@@ -758,6 +758,16 @@ process_stream(krb5_context contextp,
|
||||
reply = krb5_storage_emem();
|
||||
dreply = krb5_storage_emem();
|
||||
|
||||
if (msg == NULL || reply == NULL || dreply == NULL) {
|
||||
if (msg != NULL)
|
||||
krb5_storage_free(mem);
|
||||
if (reply != NULL)
|
||||
krb5_storage_free(reply);
|
||||
if (dreply != NULL)
|
||||
krb5_storage_free(dreply);
|
||||
return krb5_enomem(contextp);
|
||||
}
|
||||
|
||||
/*
|
||||
* First packet comes partly from the caller
|
||||
*/
|
||||
|
@@ -34,8 +34,8 @@ gss_export_sec_context(OM_uint32 *minor_status,
|
||||
gss_buffer_t interprocess_token)
|
||||
{
|
||||
OM_uint32 major_status;
|
||||
struct _gss_context *ctx = (struct _gss_context *) *context_handle;
|
||||
gssapi_mech_interface m = ctx->gc_mech;
|
||||
struct _gss_context *ctx;
|
||||
gssapi_mech_interface m;
|
||||
gss_buffer_desc buf;
|
||||
|
||||
*minor_status = 0;
|
||||
|
@@ -1688,6 +1688,9 @@ kadm5_log_nop(kadm5_server_context *context, enum kadm_nop_type nop_type)
|
||||
return errno;
|
||||
|
||||
sp = krb5_storage_emem();
|
||||
if (sp == NULL)
|
||||
return krb5_enomem(context->context);
|
||||
|
||||
ret = kadm5_log_preamble(context, sp, kadm_nop, off == 0 ? 0 : vno + 1);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
@@ -380,6 +380,8 @@ _kadm5_marshal_params(krb5_context context,
|
||||
krb5_data *out)
|
||||
{
|
||||
krb5_storage *sp = krb5_storage_emem();
|
||||
if (sp == NULL)
|
||||
return krb5_enomem(context);
|
||||
|
||||
krb5_store_int32(sp, params->mask & (KADM5_CONFIG_REALM));
|
||||
|
||||
|
@@ -541,6 +541,8 @@ fcc_initialize(krb5_context context,
|
||||
{
|
||||
krb5_storage *sp;
|
||||
sp = krb5_storage_emem();
|
||||
if (sp == NULL)
|
||||
return krb5_enomem(context);
|
||||
krb5_storage_set_eof_code(sp, KRB5_CC_END);
|
||||
if(context->fcache_vno != 0)
|
||||
f->version = context->fcache_vno;
|
||||
@@ -625,6 +627,8 @@ fcc_store_cred(krb5_context context,
|
||||
krb5_storage *sp;
|
||||
|
||||
sp = krb5_storage_emem();
|
||||
if (sp == NULL)
|
||||
return krb5_enomem(context);
|
||||
krb5_storage_set_eof_code(sp, KRB5_CC_END);
|
||||
storage_set_flags(context, sp, FCACHE(id)->version);
|
||||
ret = krb5_store_creds(sp, creds);
|
||||
|
Reference in New Issue
Block a user