summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim van der Molen <tim@cvs.openbsd.org>2019-08-12 20:56:24 +0000
committerTim van der Molen <tim@cvs.openbsd.org>2019-08-12 20:56:24 +0000
commit8c611ca208af979f443a51d08b95d71199e63ca9 (patch)
tree43f7527c2bf8bca6d9b0db6d5c94d66b46a66d49
parent1407cd965926cc7d52396de4ad52e3458e16c6d6 (diff)
Prepend a dot to every line that starts with a dot -- not merely the
ones that consist of a single dot. OK gilles@
-rw-r--r--usr.sbin/smtpd/mail.lmtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/mail.lmtp.c b/usr.sbin/smtpd/mail.lmtp.c
index d6018b53b26..e1759474a6f 100644
--- a/usr.sbin/smtpd/mail.lmtp.c
+++ b/usr.sbin/smtpd/mail.lmtp.c
@@ -289,7 +289,7 @@ stream_file(FILE *conn)
while ((linelen = getline(&line, &linesize, stdin)) != -1) {
line[strcspn(line, "\n")] = '\0';
- if (strcmp(line, ".") == 0)
+ if (line[0] == '.')
fprintf(conn, ".");
fprintf(conn, "%s\r\n", line);
}