From: John Kohl Date: Fri, 20 Apr 1990 15:01:54 +0000 (+0000) Subject: principal is malformed if it doesn't have at least 2 components X-Git-Tag: krb5-1.0-alpha2~854 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5349f1db8dfa9b8f28b5d11b1a821ea6e6fd7d63;p=krb5.git principal is malformed if it doesn't have at least 2 components git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@541 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/unparse.c b/src/lib/krb5/krb/unparse.c index 0ee112cb8..31a8f51f8 100644 --- a/src/lib/krb5/krb/unparse.c +++ b/src/lib/krb5/krb/unparse.c @@ -52,6 +52,8 @@ register char **name; register int i; int totalsize = 0; + if (!principal[0] || !principal[1]) + return KRB5_PARSE_MALFORMED; /* check for invalid elements of components; don't need to check realm, which is first component */ for (i = 1; principal[i]; i++) {