From df2373c9d3e59a50e1c3158894dbb593b5491f82 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 26 Feb 1993 20:48:56 +0000 Subject: [PATCH] Do the right thing if the passed auth data is null git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2508 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/copy_auth.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/krb5/krb/copy_auth.c b/src/lib/krb5/krb/copy_auth.c index 566492089..c4352191c 100644 --- a/src/lib/krb5/krb/copy_auth.c +++ b/src/lib/krb5/krb/copy_auth.c @@ -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)))) -- 2.26.2