Do the right thing if the passed auth data is null
authorTheodore Tso <tytso@mit.edu>
Fri, 26 Feb 1993 20:48:56 +0000 (20:48 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 26 Feb 1993 20:48:56 +0000 (20:48 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2508 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/copy_auth.c

index 56649208981eed30edebe64c523b4576ebdeda66..c4352191c5454cc3ab89fc52aba07fb8a796c9ea 100644 (file)
@@ -67,6 +67,11 @@ krb5_authdata ***outauthdat;
 
     while (inauthdat[nelems]) nelems++;
 
+    if (!inauthdat) {
+           *outauthdat = 0;
+           return 0;
+    }
+
     /* one more for a null terminated list */
     if (!(tempauthdat = (krb5_authdata **) calloc(nelems+1,
                                                  sizeof(*tempauthdat))))