summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-09-21 23:37:35 +0000
committerache <ache@FreeBSD.org>1996-09-21 23:37:35 +0000
commited571fa244cc124359a99871fdfffa9e1b439f57 (patch)
tree7ae431ec6832de4c283c2b30e491a03200cf3f08
parent2776d240a55334071c5e214546db771f40c58913 (diff)
downloadFreeBSD-src-ed571fa244cc124359a99871fdfffa9e1b439f57.zip
FreeBSD-src-ed571fa244cc124359a99871fdfffa9e1b439f57.tar.gz
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.
-rw-r--r--usr.sbin/sendmail/src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/sendmail/src/util.c b/usr.sbin/sendmail/src/util.c
index 3065e38..b492a2e 100644
--- a/usr.sbin/sendmail/src/util.c
+++ b/usr.sbin/sendmail/src/util.c
@@ -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);
}
OpenPOWER on IntegriCloud