The cell string within a ktc_principal is only 64 characters long.
Be careful not to overflow it.
Caught by coverity (#985829)
Reviewed-on: http://gerrit.openafs.org/9350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit
77aa6c65b74e46c77dfaf440745496ab98b14244)
Change-Id: I7e0411ce635d481cf1618c2eabf79dfb85fcd069
Reviewed-on: http://gerrit.openafs.org/11037
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
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);