String handling in krb5

Sam Hartman hartmans at MIT.EDU
Mon Nov 3 15:13:13 EST 2008

>>>>> "Greg" == Greg Hudson <ghudson at MIT.EDU> writes:

    Greg> On Mon, 2008-11-03 at 11:59 -0500, Sam Hartman wrote:
    >> Greg, is it safe to use k5buf for strings that may contain
    >> nulls?  If so, is cstr really the right name for the function
    >> to get a char *?

    Greg> I could rename it to krb5int_buf_data.  The point of calling
    Greg> it the "C string" is that the caller can be assured that
    Greg> it's null-terminated, but perhaps that name would be too
    Greg> unnatural for code using the k5bufs with binary data.

I'm OK with either interpretation but I think supporting internal nulls is a good idea for this interface.

More information about the krbdev mailing list