From: Tom Yu Date: Fri, 2 Aug 2002 00:38:22 +0000 (+0000) Subject: * unparse.c (krb5_unparse_name_ext): Error out if passed a NULL X-Git-Tag: krb5-1.3-alpha1~540 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c360d766253d88e52891e5aaf8ee0cc2f4fc2a08;p=krb5.git * unparse.c (krb5_unparse_name_ext): Error out if passed a NULL pointer. Patch from Mark Levinson; fixes [krb5-admin/1140]. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14679 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 0406fc87f..c650e9e98 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +2002-08-01 Tom Yu + + * unparse.c (krb5_unparse_name_ext): Error out if passed a NULL + pointer. Patch from Mark Levinson; fixes [krb5-admin/1140]. + 2002-06-26 Ezra Peisach * appdefault.c (conf_boolean): Change variable from char ** to diff --git a/src/lib/krb5/krb/unparse.c b/src/lib/krb5/krb/unparse.c index 12755d924..f24d46808 100644 --- a/src/lib/krb5/krb/unparse.c +++ b/src/lib/krb5/krb/unparse.c @@ -70,6 +70,9 @@ krb5_unparse_name_ext(context, principal, name, size) krb5_int32 nelem; register unsigned int totalsize = 0; + if (!principal) + return KRB5_PARSE_MALFORMED; + cp = krb5_princ_realm(context, principal)->data; length = krb5_princ_realm(context, principal)->length; totalsize += length;