summaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2008-10-17 13:02:56 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2008-10-17 13:02:56 +0000
commit45f296784ba92c17537efc10eda48d303d944131 (patch)
tree6387292e494fa63e396905211071022c7143d658 /usr.sbin/ypldap
parentb889f56217d8ef61344301ca2e47dcc23ef9af93 (diff)
bring in the findeol() fix from pfctl. list of affected parsers by sthen
Diffstat (limited to 'usr.sbin/ypldap')
-rw-r--r--usr.sbin/ypldap/parse.y8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y
index dfab48c3c11..f7c386b7ad4 100644
--- a/usr.sbin/ypldap/parse.y
+++ b/usr.sbin/ypldap/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.3 2008/10/14 21:41:03 aschrijver Exp $ */
+/* $OpenBSD: parse.y,v 1.4 2008/10/17 13:02:55 henning Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -480,11 +480,13 @@ findeol(void)
int c;
parsebuf = NULL;
- pushback_index = 0;
/* skip to either EOF or the first real EOL */
while (1) {
- c = lgetc(0);
+ if (pushback_index)
+ c = pushback_buffer[--pushback_index];
+ else
+ c = lgetc(0);
if (c == '\n') {
file->lineno++;
break;