From a10b59b58ce55ccd3dfed5b31698991da988d3e2 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Mon, 27 Sep 1993 16:23:32 -0800 Subject: [PATCH] repair numeric codes on $#error lines (broken a few days ago) SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.12 --- usr/src/usr.sbin/sendmail/src/parseaddr.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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; } -- 2.20.1