* unparse.c (krb5_unparse_name_ext): Error out if passed a NULL
authorTom Yu <tlyu@mit.edu>
Fri, 2 Aug 2002 00:38:22 +0000 (00:38 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 2 Aug 2002 00:38:22 +0000 (00:38 +0000)
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
src/lib/krb5/krb/unparse.c

index 0406fc87f4a4ba77c802a203e63ee384e0facd12..c650e9e98cf829ed7c15abd3cc4ac41cbd1be328 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-01  Tom Yu  <tlyu@mit.edu>
+
+       * 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  <epeisach@bu.edu>
 
        * appdefault.c (conf_boolean): Change variable from char ** to
index 12755d9243d9ffddce42c473f87cb8cabbb21223..f24d46808ed54e34992c1284c6347027d115ec68 100644 (file)
@@ -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;