mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
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:
parent
daa011af02
commit
37d106e228
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user