diff options
author | fenner <fenner@FreeBSD.org> | 2001-11-07 00:05:26 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2001-11-07 00:05:26 +0000 |
commit | a53b61e772f8606cd8a338c0298ccd3691135569 (patch) | |
tree | c6d3c8b17339540bc682d3596b3963c9c6fa8e95 /lib/libc/net/nsparser.y | |
parent | 140b89bb7704684c4efa5162eb0fdde1adcf3c2c (diff) | |
download | FreeBSD-src-a53b61e772f8606cd8a338c0298ccd3691135569.zip FreeBSD-src-a53b61e772f8606cd8a338c0298ccd3691135569.tar.gz |
Don't ignore unknown characters. The previous code treated a line like:
hosts:!!!!!!!!@@@@@$%^&*()()*$(files{}{}|||++!)(dns
exactly the same as:
hosts: files dns
Recover from parse errors by looking for the end of a line; this
allows entries without errors to still be parsed even if there is
an erroneous entry earlier in the file.
Diffstat (limited to 'lib/libc/net/nsparser.y')
-rw-r--r-- | lib/libc/net/nsparser.y | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/net/nsparser.y b/lib/libc/net/nsparser.y index b39f011..79d5185 100644 --- a/lib/libc/net/nsparser.y +++ b/lib/libc/net/nsparser.y @@ -87,6 +87,10 @@ Entry { _nsdbtput(&curdbt); } + | error NL + { + yyerrok; + } ; Database |