From 5349f1db8dfa9b8f28b5d11b1a821ea6e6fd7d63 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Fri, 20 Apr 1990 15:01:54 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/unparse.c | 2 ++ 1 file changed, 2 insertions(+) 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++) { -- 2.26.2