summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorAlexandr Nedvedicky <sashan@cvs.openbsd.org>2018-11-01 00:18:45 +0000
committerAlexandr Nedvedicky <sashan@cvs.openbsd.org>2018-11-01 00:18:45 +0000
commitd9c4b687773fa49c79bfbeddfe9b559a3b48cc06 (patch)
treed865892bf5acdee6e738f603e26ce85842cab0f4 /usr.sbin/smtpd
parent44350b70db3560f32688395cbd6b4af5561520b7 (diff)
- odd condition/test in PF lexer
(and other lexers too) This commit rectifies earlier change: in the lex... even inside quotes, a \ followed by space or tab should expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). OK deraadt@, OK millert@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index c3177e3f058..366ff71d59a 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.222 2018/09/24 16:14:34 eric Exp $ */
+/* $OpenBSD: parse.y,v 1.223 2018/11/01 00:18:44 sashan Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1852,7 +1852,8 @@ top:
} else if (c == '\\') {
if ((next = lgetc(quotec)) == EOF)
return (0);
- if (next == quotec || c == ' ' || c == '\t')
+ if (next == quotec || next == ' ' ||
+ next == '\t')
c = next;
else if (next == '\n') {
file->lineno++;