Reset out variables.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19965 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -38,6 +38,7 @@ _gss_copy_oid(OM_uint32 *minor_status,
|
|||||||
*minor_status = 0;
|
*minor_status = 0;
|
||||||
to_oid->elements = malloc(len);
|
to_oid->elements = malloc(len);
|
||||||
if (!to_oid->elements) {
|
if (!to_oid->elements) {
|
||||||
|
to_oid->length = 0;
|
||||||
*minor_status = ENOMEM;
|
*minor_status = ENOMEM;
|
||||||
return GSS_S_FAILURE;
|
return GSS_S_FAILURE;
|
||||||
}
|
}
|
||||||
@@ -68,6 +69,7 @@ _gss_copy_buffer(OM_uint32 *minor_status,
|
|||||||
to_buf->value = malloc(len);
|
to_buf->value = malloc(len);
|
||||||
if (!to_buf->value) {
|
if (!to_buf->value) {
|
||||||
*minor_status = ENOMEM;
|
*minor_status = ENOMEM;
|
||||||
|
to_buf->length = 0;
|
||||||
return GSS_S_FAILURE;
|
return GSS_S_FAILURE;
|
||||||
}
|
}
|
||||||
to_buf->length = len;
|
to_buf->length = len;
|
||||||
|
@@ -39,6 +39,8 @@ gss_verify_mic(OM_uint32 *minor_status,
|
|||||||
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 = ctx->gc_mech;
|
||||||
|
|
||||||
|
if (qop_state)
|
||||||
|
*qop_state = 0;
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
*minor_status = 0;
|
*minor_status = 0;
|
||||||
return GSS_S_NO_CONTEXT;
|
return GSS_S_NO_CONTEXT;
|
||||||
|
@@ -41,6 +41,14 @@ gss_wrap(OM_uint32 *minor_status,
|
|||||||
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 = ctx->gc_mech;
|
||||||
|
|
||||||
|
if (conf_state)
|
||||||
|
*conf_state = 0;
|
||||||
|
_mg_buffer_zero(output_message_buffer);
|
||||||
|
if (ctx == NULL) {
|
||||||
|
*minor_status = 0;
|
||||||
|
return GSS_S_NO_CONTEXT;
|
||||||
|
}
|
||||||
|
|
||||||
return (m->gm_wrap(minor_status, ctx->gc_ctx,
|
return (m->gm_wrap(minor_status, ctx->gc_ctx,
|
||||||
conf_req_flag, qop_req, input_message_buffer,
|
conf_req_flag, qop_req, input_message_buffer,
|
||||||
conf_state, output_message_buffer));
|
conf_state, output_message_buffer));
|
||||||
|
@@ -39,6 +39,12 @@ gss_wrap_size_limit(OM_uint32 *minor_status,
|
|||||||
{
|
{
|
||||||
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 = ctx->gc_mech;
|
||||||
|
|
||||||
|
*max_input_size = 0;
|
||||||
|
if (ctx == NULL) {
|
||||||
|
*minor_status = 0;
|
||||||
|
return GSS_S_NO_CONTEXT;
|
||||||
|
}
|
||||||
|
|
||||||
return (m->gm_wrap_size_limit(minor_status, ctx->gc_ctx,
|
return (m->gm_wrap_size_limit(minor_status, ctx->gc_ctx,
|
||||||
conf_req_flag, qop_req, req_output_size, max_input_size));
|
conf_req_flag, qop_req, req_output_size, max_input_size));
|
||||||
|
Reference in New Issue
Block a user