avoid bug with null tickets in array
authorJohn Kohl <jtkohl@mit.edu>
Thu, 11 Oct 1990 00:57:34 +0000 (00:57 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 11 Oct 1990 00:57:34 +0000 (00:57 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1243 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/asn.1/tgrq2ktgrq.c

index d8433beeea16c2855bc75f463343f79a8e79549d..f4967a41f6539edbda361b0e48c6405ac8948230 100644 (file)
@@ -108,7 +108,7 @@ register int *error;
        /* plus one for null terminator */
        aticks = (krb5_ticket **) xcalloc(tptr->nelem + 1,
                                          sizeof(*aticks));
-       for (i = 0; i < tptr->nelem; i++) {
+       for (i = 0; (i < tptr->nelem) && tptr->Ticket[i]; i++) {
            aticks[i] = KRB5_Ticket2krb5_ticket(tptr->Ticket[i], error);
            if (!aticks[i]) {
                while (i >= 0) {