From c360d766253d88e52891e5aaf8ee0cc2f4fc2a08 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 2 Aug 2002 00:38:22 +0000 Subject: [PATCH] * 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 --- src/lib/krb5/krb/ChangeLog | 5 +++++ src/lib/krb5/krb/unparse.c | 3 +++ 2 files changed, 8 insertions(+) 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; -- 2.26.2