From 22a9b4318e323040f7931281cf8914d07c07210a Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 3 Jun 1993 00:11:44 +0000 Subject: [PATCH] Fix bug where an allocated structure was used before it was checked to see if it were null. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2552 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/copy_auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/krb/copy_auth.c b/src/lib/krb5/krb/copy_auth.c index c4352191c..f3d19865e 100644 --- a/src/lib/krb5/krb/copy_auth.c +++ b/src/lib/krb5/krb/copy_auth.c @@ -65,13 +65,13 @@ krb5_authdata ***outauthdat; krb5_authdata ** tempauthdat; register int nelems = 0; - while (inauthdat[nelems]) nelems++; - if (!inauthdat) { *outauthdat = 0; return 0; } + while (inauthdat[nelems]) nelems++; + /* one more for a null terminated list */ if (!(tempauthdat = (krb5_authdata **) calloc(nelems+1, sizeof(*tempauthdat)))) -- 2.26.2