Null-terminate components of parsed principals
authorGreg Hudson <ghudson@mit.edu>
Sat, 12 May 2012 16:54:06 +0000 (12:54 -0400)
committerGreg Hudson <ghudson@mit.edu>
Sat, 12 May 2012 16:54:06 +0000 (12:54 -0400)
commit74beb75bb07e3921d10c8eec05eacb1f393e5e44
treeee44004888aa87b398bc16d36b899d8c4535d5e3
parent39629e9df44ce8c4ad72fde951390acc6864407d
Null-terminate components of parsed principals

The rewritten krb5_parse_name didn't null-terminate components or
realms of principals, while the old one did.  Fix the new one to do so
as well.

This means KRB5_PRINCIPAL_PARSE_IGNORE_REALM allocates one byte for
the realm instead of leaving it as empty_data(), so we need to free
the realm in build_in_tkt_name() before copying in the client realm.
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/parse.c