summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2019-01-29 15:40:46 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2019-01-29 15:40:46 +0000
commit1c9cdf476d76350977c8f3bd26f5e3f81887c77d (patch)
tree621018e0b4feaf47ca47a0b99d7e7677fe2f053e /usr.sbin/smtpd
parent422bdeb4eba3795d2416164b716fef77c998dcc8 (diff)
strip \r from lmtp responses
ok sunil@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/mail.lmtp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/smtpd/mail.lmtp.c b/usr.sbin/smtpd/mail.lmtp.c
index dc5b837ccc9..740af692a1f 100644
--- a/usr.sbin/smtpd/mail.lmtp.c
+++ b/usr.sbin/smtpd/mail.lmtp.c
@@ -218,6 +218,7 @@ lmtp_engine(FILE *conn, struct session *session)
if ((linelen = getline(&line, &linesize, conn)) == -1)
err(1, "getline");
line[strcspn(line, "\n")] = '\0';
+ line[strcspn(line, "\r")] = '\0';
if (linelen < 4 ||
!isdigit(line[0]) ||