mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
kauth: Don't overflow cell string
The cell string within a ktc_principal is only 64 characters long. Be careful not to overflow it. Caught by coverity (#985829) Change-Id: I761dfcf5eebf1bd4ef31aa5982a2593e5317257b Reviewed-on: http://gerrit.openafs.org/9350 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
362728d2d6
commit
77aa6c65b7
@ -183,7 +183,7 @@ GetTokens(afs_int32 ahost, afs_int32 auid)
|
||||
sprintf(clientName.name, "Unix UID %d", ct.ViceId);
|
||||
clientName.instance[0] = 0;
|
||||
}
|
||||
strcpy(clientName.cell, tp);
|
||||
strlcpy(clientName.cell, tp, sizeof(clientName.cell));
|
||||
|
||||
tokenExpireTime = token.endTime;
|
||||
strcpy(UserName, clientName.name);
|
||||
|
Loading…
Reference in New Issue
Block a user