repair numeric codes on $#error lines (broken a few days ago)
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Tue, 28 Sep 1993 00:23:32 +0000 (16:23 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Tue, 28 Sep 1993 00:23:32 +0000 (16:23 -0800)
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.12

usr/src/usr.sbin/sendmail/src/parseaddr.c

index 1bbdbfe..a94c23b 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #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"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -1597,7 +1597,21 @@ badaddr:
                        syslog (LOG_DEBUG, "%s: Trace: $#ERROR $: %s",
                                CurEnv->e_id, buf);
 #endif /* LOG */
                        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;
        }
 
                goto badaddr;
        }