diff options
Diffstat (limited to 'usr.sbin/smtpd/smtp_client.c')
-rw-r--r-- | usr.sbin/smtpd/smtp_client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtp_client.c b/usr.sbin/smtpd/smtp_client.c index 528f48b7f07..8e146e1b7c2 100644 --- a/usr.sbin/smtpd/smtp_client.c +++ b/usr.sbin/smtpd/smtp_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_client.c,v 1.13 2020/02/24 23:54:27 millert Exp $ */ +/* $OpenBSD: smtp_client.c,v 1.14 2020/04/24 11:34:07 eric Exp $ */ /* * Copyright (c) 2018 Eric Faurot <eric@openbsd.org> @@ -680,6 +680,10 @@ smtp_client_readline(struct smtp_client *proto) return 0; } + /* Strip trailing '\r' */ + if (len && line[len - 1] == '\r') + line[--len] = '\0'; + log_trace(TRACE_SMTPCLT, "%p: <<< %s", proto, line); /* Validate SMTP */ |