mapname-allocate-enough-space-for-pr-nametoid-20030505

the alternative is to crash when we get a foreign user here
This commit is contained in:
Derrick Brashear 2003-05-05 16:40:25 +00:00
parent e9993b1fce
commit 76832e229e

View File

@ -1226,7 +1226,7 @@ static int MapName_r(char *aname, char *acell, afs_int32 *aval)
return 0;
}
foreign = 1; /* attempt cross-cell authentication */
tname = (char *) malloc(anamelen+cnamelen+2);
tname = (char *) malloc(PR_MAXNAMELEN);
if (!tname) {
ViceLog(0, ("Failed malloc in MapName_r\n"));
assert(0);