diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index f4e77c0a92..b76e61e64a 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -1382,10 +1382,8 @@ DECL_PIOCTL(PSetTokens) memcpy((char *)&i, ain, sizeof(afs_int32)); ain += sizeof(afs_int32); stp = ain; /* remember where the ticket is */ - if (i < 0 || i > 2000) + if (i < 0 || i > MAXKTCTICKETLEN) return EINVAL; /* malloc may fail */ - if (i > MAXKTCTICKETLEN) - return EINVAL; stLen = i; ain += i; /* skip over ticket */ memcpy((char *)&i, ain, sizeof(afs_int32));