Always initialize the output parameter in krb5_parse_name and friends
authorGreg Hudson <ghudson@mit.edu>
Fri, 23 Jan 2009 17:45:58 +0000 (17:45 +0000)
committerGreg Hudson <ghudson@mit.edu>
Fri, 23 Jan 2009 17:45:58 +0000 (17:45 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21784 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/parse.c

index 5c705490d3e243f5dad7cbd755f69597f588ea95..87548097a53a100a825d40929f2dece2faf7e23d 100644 (file)
@@ -82,6 +82,8 @@ k5_parse_name(krb5_context context, const char *name,
        unsigned int    enterprise = (flags & KRB5_PRINCIPAL_PARSE_ENTERPRISE);
        int             first_at;
 
+       *nprincipal = NULL;
+
        /*
         * Pass 1.  Find out how many components there are to the name,
         * and get string sizes for the first FCOMPNUM components. For