kaanswertoolong-20040420

when determining whether or not the ticket len is too long for the
receiver to accept we want to compare against the actual ticket length
and not MAXKTCTICKETLEN which is what is used when sizeof(ktc_ticketAnswer)
is used for comparison.
This commit is contained in:
Jeffrey Altman 2004-04-20 15:56:16 +00:00 committed by Jeffrey Altman
parent daa011af02
commit 37d106e228

View File

@ -1032,7 +1032,7 @@ PrepareTicketAnswer(oanswer, challenge, ticket, ticketLen, sessionKey, start,
code = KAANSWERTOOLONG;
if (oanswer->MaxSeqLen <
sizeof(struct ka_ticketAnswer) - 5 * MAXKTCNAMELEN)
sizeof(struct ka_ticketAnswer) - 5 * MAXKTCNAMELEN - MAXKTCTICKETLEN + ticketLen)
return code;
answer = (struct ka_ticketAnswer *)oanswer->SeqBody;
@ -1958,7 +1958,7 @@ GetTicket(version, call, kvno, authDomain, aticket, sname, sinstance, atimes,
case 0:
code = KAANSWERTOOLONG;
if (oanswer->MaxSeqLen <
sizeof(struct ka_getTicketAnswer) - 5 * MAXKTCNAMELEN)
sizeof(struct ka_getTicketAnswer) - 5 * MAXKTCNAMELEN - MAXKTCTICKETLEN + ticketLen)
goto abort;
answer = (struct ka_getTicketAnswer *)oanswer->SeqBody;