mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 10:43:32 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18451
@ -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…
Reference in New Issue
Block a user