From 6d2498c22d56c122cd3106ad86d772b65a3fddb5 Mon Sep 17 00:00:00 2001 From: sashan <> Date: Thu, 1 Nov 2018 00:18:44 +0000 Subject: [PATCH] - 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@ --- src/usr.sbin/ntpd/parse.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y index e30926b3..be1a7b53 100644 --- a/src/usr.sbin/ntpd/parse.y +++ b/src/usr.sbin/ntpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.69 2018/07/09 12:05:11 krw Exp $ */ +/* $OpenBSD: parse.y,v 1.70 2018/11/01 00:18:44 sashan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -635,7 +635,8 @@ yylex(void) } 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++;