From: John Kohl Date: Thu, 11 Oct 1990 00:57:34 +0000 (+0000) Subject: avoid bug with null tickets in array X-Git-Tag: krb5-1.0-alpha2~168 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c4730acd1d08a9d117710969f7536c3eccb271f4;p=krb5.git avoid bug with null tickets in array git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1243 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/tgrq2ktgrq.c b/src/lib/krb5/asn.1/tgrq2ktgrq.c index d8433beee..f4967a41f 100644 --- a/src/lib/krb5/asn.1/tgrq2ktgrq.c +++ b/src/lib/krb5/asn.1/tgrq2ktgrq.c @@ -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) {