From 6ab3f45adffdb26029164835fd1917f95dd078bb Mon Sep 17 00:00:00 2001 From: Paul Park Date: Tue, 29 Aug 1995 21:50:19 +0000 Subject: [PATCH] Zero out newly allocated context so encrypt_block doesnt have garbage git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6635 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 6 ++++++ src/lib/gssapi/krb5/accept_sec_context.c | 1 + src/lib/gssapi/krb5/init_sec_context.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 8e9b8fca7..6d378f878 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,4 +1,10 @@ +Tue Aug 29 17:48:40 EDT 1995 Paul Park (pjpark@mit.edu) + * {accept,init}_sec_context.c - Zero out the newly allocated context + because garbage in the uninitialized context messes up the + serializers. + + Tue Aug 29 13:31:46 EDT 1995 Paul Park (pjpark@mit.edu) * Makefile.in, .Sanitize, {im,ex}port_sec_context.c, ser_sctx.c - Add new modules to support {im,ex}port of GSSAPI context. diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c index f0317944c..ba62cbb20 100644 --- a/src/lib/gssapi/krb5/accept_sec_context.c +++ b/src/lib/gssapi/krb5/accept_sec_context.c @@ -213,6 +213,7 @@ krb5_gss_accept_sec_context(context, minor_status, context_handle, return(GSS_S_FAILURE); } + memset(ctx, 0, sizeof(krb5_gss_ctx_id_rec)); ctx->context = context; ctx->auth_context = auth_context; ctx->initiate = 0; diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c index bbcb308b8..2bf413f5c 100644 --- a/src/lib/gssapi/krb5/init_sec_context.c +++ b/src/lib/gssapi/krb5/init_sec_context.c @@ -243,7 +243,7 @@ krb5_gss_init_sec_context(context, minor_status, claimant_cred_handle, } /* fill in the ctx */ - + memset(ctx, 0, sizeof(krb5_gss_ctx_id_rec)); ctx->context = context; ctx->auth_context = NULL; ctx->initiate = 1; -- 2.26.2