Fix & expansion (from pw_gecos field), sizeof buf used when
buf is pointer, not array, buflen must be used instead. Charlie & from root name was expanded to junk as result.
This commit is contained in:
parent
f98e6287f8
commit
c0eb19c55f
@ -418,7 +418,7 @@ buildfname(gecos, login, buf, buflen)
|
||||
{
|
||||
if (*p == '&')
|
||||
{
|
||||
snprintf(bp, SPACELEFT(buf, bp), "%s", login);
|
||||
snprintf(bp, buflen - (bp - buf), "%s", login);
|
||||
*bp = toupper(*bp);
|
||||
bp += strlen(bp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user