From: Eric Allman Date: Tue, 28 Sep 1993 00:23:32 +0000 (-0800) Subject: repair numeric codes on $#error lines (broken a few days ago) X-Git-Tag: BSD-4_4_Lite1-Snapshot-Development~1692 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/a10b59b58ce55ccd3dfed5b31698991da988d3e2 repair numeric codes on $#error lines (broken a few days ago) SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.12 --- diff --git a/usr/src/usr.sbin/sendmail/src/parseaddr.c b/usr/src/usr.sbin/sendmail/src/parseaddr.c index 1bbdbfefd2..a94c23b437 100644 --- a/usr/src/usr.sbin/sendmail/src/parseaddr.c +++ b/usr/src/usr.sbin/sendmail/src/parseaddr.c @@ -7,7 +7,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)parseaddr.c 8.11 (Berkeley) %G%"; +static char sccsid[] = "@(#)parseaddr.c 8.12 (Berkeley) %G%"; #endif /* not lint */ #include "sendmail.h" @@ -1597,7 +1597,21 @@ badaddr: syslog (LOG_DEBUG, "%s: Trace: $#ERROR $: %s", CurEnv->e_id, buf); #endif /* LOG */ - usrerr("%s", buf); + if (isascii(buf[0]) && isdigit(buf[0]) && + isascii(buf[1]) && isdigit(buf[1]) && + isascii(buf[2]) && isdigit(buf[2]) && + buf[3] == ' ') + { + char fmt[10]; + + strncpy(fmt, buf, 3); + strcpy(&fmt[3], " %s"); + usrerr(fmt, buf + 4); + } + else + { + usrerr("%s", buf); + } goto badaddr; }