In kg_accept_krb5, use gssalloc_malloc when allocating space for the
error token, since it will be freed with gssalloc_free. Using malloc
can cause heap corruption on Windows. This bug was masked by #1445
before 1.12.
(cherry picked from commit
68cfc8b4e6338b78dce5a960ce47974a73906fac)
ticket: 8129 (new)
version_fixed: 1.12.3
status: resolved
toktype = KG_TOK_CTX_ERROR;
token.length = g_token_size(mech_used, tmsglen);
- token.value = (unsigned char *) xmalloc(token.length);
+ token.value = gssalloc_malloc(token.length);
if (!token.value)
goto done;