summaryrefslogtreecommitdiffstats
path: root/roff.7
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
commit5086d878fd97d26b928c5a38d9e1c5dba788cf4a (patch)
tree265018173abe1a7d4bd48a1e847990309a8482be /roff.7
parent0ea3458e9a7b752653b5397bb21ee0977a4b77ab (diff)
downloadmandoc-5086d878fd97d26b928c5a38d9e1c5dba788cf4a.tar.gz
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 'roff.7')
-rw-r--r--roff.76
1 files changed, 6 insertions, 0 deletions
diff --git a/roff.7 b/roff.7
index 2f007718..a29d6a92 100644
--- a/roff.7
+++ b/roff.7
@@ -196,6 +196,12 @@ string interpolation syntax described below
.Sx ds ,
but this is rarely useful because every macro definition contains at least
one explicit newline character.
+.Pp
+In order to prevent endless recursion, both groff and
+.Xr mandoc 1
+limit the stack depth for expanding macros and strings
+to a large, but finite number.
+Do not rely on the exact value of this limit.
.Ss \&dei
Define a user-defined
.Nm