For review: GSS memory allocation patches

Kevin Wasserman krwasserman at
Wed Oct 12 19:43:59 EDT 2011

I've pushed updated versions of these patches to Sam's github repository
(rebased off mit trunk as of this afternoon).  These should address the
concerns raised by Greg as well as properly handling out-of-memory
conditions, gss_OID_set memory usage and GSS_C_DCE_STYLE.

Simplify gss_indicate_mechs() by using generic_gss_copy_oid_set
Add new public header gssapi_alloc.h (added gssalloc_calloc; fixed to use 
strlcpy instead of strcpy)
Utility functions to move allocations from k5buf/krb5_data to gss_buffer_t
Use gssalloc memory management where appropriate
Add "-dce" commandline option to gss-client.c to set GSS_C_DCE_STYLE flag 

More information about the krbdev mailing list