kauth: Don't overflow cell string
[openafs.git] / src / kauth / knfs.c
index 4b4be5a..81a03d6 100644 (file)
@@ -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);