aboutsummaryrefslogtreecommitdiffstats
path: root/smtp_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'smtp_client.c')
-rw-r--r--smtp_client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/smtp_client.c b/smtp_client.c
index 528f48b7..8e146e1b 100644
--- a/smtp_client.c
+++ b/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 */