From 634c8ff3cccc4ae559375df17d2e7b444ec1a1a0 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Wed, 28 Dec 1983 05:21:47 -0800 Subject: [PATCH] fix bug with un-DBM'ed alias files that adds a newline on the end of the last entry in the alias; found by John Gilmore, SMI SCCS-vsn: usr.sbin/sendmail/src/alias.c 4.2 SCCS-vsn: usr.sbin/sendmail/src/version.c 4.23 --- usr/src/usr.sbin/sendmail/src/alias.c | 9 ++++++--- usr/src/usr.sbin/sendmail/src/version.c | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/alias.c b/usr/src/usr.sbin/sendmail/src/alias.c index 1831af4c3b..e30e85d7f9 100644 --- a/usr/src/usr.sbin/sendmail/src/alias.c +++ b/usr/src/usr.sbin/sendmail/src/alias.c @@ -5,9 +5,9 @@ # include "sendmail.h" # ifdef DBM -SCCSID(@(#)alias.c 4.1 %G% (with DBM)); +SCCSID(@(#)alias.c 4.2 %G% (with DBM)); # else DBM -SCCSID(@(#)alias.c 4.1 %G% (without DBM)); +SCCSID(@(#)alias.c 4.2 %G% (without DBM)); # endif DBM /* @@ -419,7 +419,10 @@ readaliases(aliasfile, init) } } else - p = &p[strlen(p)]; + { + p = &p[strlen(p) - 1]; + *p = '\0'; + } /* see if there should be a continuation line */ c = fgetc(af); diff --git a/usr/src/usr.sbin/sendmail/src/version.c b/usr/src/usr.sbin/sendmail/src/version.c index 5736a72914..82bd6651b2 100644 --- a/usr/src/usr.sbin/sendmail/src/version.c +++ b/usr/src/usr.sbin/sendmail/src/version.c @@ -1,5 +1,5 @@ # ifndef lint -static char SccsId[] = "@(#)SendMail version 4.22 of %G%"; +static char SccsId[] = "@(#)SendMail version 4.23 of %G%"; # endif lint -char Version[] = "4.22"; +char Version[] = "4.23"; -- 2.20.1