diff options
author | kan <kan@FreeBSD.org> | 2010-06-11 04:38:14 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2010-06-11 04:38:14 +0000 |
commit | ab388bc53ea642cb0a450c7bc6ca5f410fc6ec27 (patch) | |
tree | 1c913d9b45b96992c572a933a9eb2a9a7eb5df58 | |
parent | cd4e0b719a035144e028b3d693d8047e64873e42 (diff) | |
download | FreeBSD-src-ab388bc53ea642cb0a450c7bc6ca5f410fc6ec27.zip FreeBSD-src-ab388bc53ea642cb0a450c7bc6ca5f410fc6ec27.tar.gz |
In dtrace lexer, do not unput token if it is EOF.
This is harmless with OpenSolaris fex and yacc, but with FreeBSD
causes '\xff' symbol to be physically put into input buffer, causing
subsequent syntax error.
MFC after: 1 week
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index 4897527..568a2a1 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l @@ -811,7 +811,8 @@ id_or_type(const char *s) longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); } - unput(c0); + if (c0 != EOF) + unput(c0); return (ttok); } |