Hans Leidekker (@hans) commented about dlls/kerberos/krb5_ap.c:
*out_buf_len = 1024; for (;;) {
KERB_QUERY_TKT_CACHE_RESPONSE *resp = malloc( *out_buf_len );
KERB_QUERY_TKT_CACHE_EX_RESPONSE *resp = malloc( *out_buf_len ); struct query_ticket_cache_params params = { resp, out_buf_len }; status = KRB5_CALL( query_ticket_cache, ¶ms );
While you're at it, please check for allocation failure here and below.