fix bug with un-DBM'ed alias files that adds a newline on the end of
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 28 Dec 1983 13:21:47 +0000 (05:21 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 28 Dec 1983 13:21:47 +0000 (05:21 -0800)
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
usr/src/usr.sbin/sendmail/src/version.c

index 1831af4..e30e85d 100644 (file)
@@ -5,9 +5,9 @@
 # include "sendmail.h"
 
 # ifdef DBM
 # include "sendmail.h"
 
 # ifdef DBM
-SCCSID(@(#)alias.c     4.1             %G%     (with DBM));
+SCCSID(@(#)alias.c     4.2             %G%     (with DBM));
 # else DBM
 # else DBM
-SCCSID(@(#)alias.c     4.1             %G%     (without DBM));
+SCCSID(@(#)alias.c     4.2             %G%     (without DBM));
 # endif DBM
 
 /*
 # endif DBM
 
 /*
@@ -419,7 +419,10 @@ readaliases(aliasfile, init)
                                }
                        }
                        else
                                }
                        }
                        else
-                               p = &p[strlen(p)];
+                       {
+                               p = &p[strlen(p) - 1];
+                               *p = '\0';
+                       }
 
                        /* see if there should be a continuation line */
                        c = fgetc(af);
 
                        /* see if there should be a continuation line */
                        c = fgetc(af);
index 5736a72..82bd665 100644 (file)
@@ -1,5 +1,5 @@
 # ifndef lint
 # ifndef lint
-static char    SccsId[] = "@(#)SendMail version 4.22 of %G%";
+static char    SccsId[] = "@(#)SendMail version 4.23 of %G%";
 # endif lint
 
 # endif lint
 
-char   Version[] = "4.22";
+char   Version[] = "4.23";