* init_sec_context.c (krb5_gss_init_sec_context): Free
default_enctypes to avoid leaking returned value from
krb5_get_tgs_ktypes.
* k5unseal.c (kg_unseal_v1): Explicitly set token.value to NULL if
token.length == 0, to avoid spurious uninitialized memory
references when calling memcpy() with a zero length.
ticket: new
target_version: 1.3
tags: pullup
component: krb5-libs
cc: Kent_Wu@trendmicro.com
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15619
dc483132-0cff-0310-8789-
dd5450dbe970
* init_sec_context.c (make_ap_req_v1): Free checksum_data if
needed, to avoid leaking memory. Found by Kent Wu.
+ (krb5_gss_init_sec_context): Free default_enctypes to avoid
+ leaking returned value from krb5_get_tgs_ktypes.
+
+ * k5unseal.c (kg_unseal_v1): Explicitly set token.value to NULL if
+ token.length == 0, to avoid spurious uninitialized memory
+ references when calling memcpy() with a zero length.
2003-05-13 Tom Yu <tlyu@mit.edu>
if (!is_duplicate_enctype)
requested_enctypes[i++] = e;
}
+ krb5_free_ktypes(context, default_enctypes);
requested_enctypes[i++] = 0;
if ((code = get_credentials(context, cred, ctx->there, now,
return(GSS_S_FAILURE);
}
memcpy(token.value, plain+conflen, token.length);
+ } else {
+ token.value = NULL;
}
} else if (toktype == KG_TOK_SIGN_MSG) {
token = *message_buffer;