aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-12-10 20:58:56 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-12-10 20:58:56 +0000
commit81689ffd1549a3846ce2cda5142974f268795426 (patch)
tree6f8b0f3cae35bd5cb71058ee27a6ad21750b52c3 /mandoc.h
parent7642cc3b7f2a5238132e168211d75b0d999161b6 (diff)
downloadmandoc-81689ffd1549a3846ce2cda5142974f268795426.tar.gz
mandoc-81689ffd1549a3846ce2cda5142974f268795426.tar.zst
mandoc-81689ffd1549a3846ce2cda5142974f268795426.zip
Abort endless loops during roff macro and string expansion.
For now, use the simplest conceivable approach, like groff does: Just a fixed, ugly input stack limit. "check it in" kristaps@
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/mandoc.h b/mandoc.h
index 03c93f3e..14687e0b 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.32 2010/12/06 16:55:35 kristaps Exp $ */
+/* $Id: mandoc.h,v 1.33 2010/12/10 20:58:56 schwarze Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -101,6 +101,7 @@ enum mandocerr {
MANDOCERR_ERROR, /* ===== start of errors ===== */
+ MANDOCERR_ROFFLOOP, /* input stack limit exceeded, infinite loop? */
MANDOCERR_BADCHAR, /* skipping bad character */
MANDOCERR_NOTEXT, /* skipping text before the first section header */
MANDOCERR_MACRO, /* skipping unknown macro */