summaryrefslogtreecommitdiffstats
path: root/roff.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-25 17:23:32 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-25 17:23:32 +0000
commitb1128883721e330dd696d3ee5bbaabaa4c3d45b3 (patch)
treee5947f5bed5ad9135dc9640760a2d40904b6ff19 /roff.7
parent4039dc9d2363717732db9e312b0dcc38973d1a54 (diff)
downloadmandoc-b1128883721e330dd696d3ee5bbaabaa4c3d45b3.tar.gz
Reduce memory and time consumption on certain malformed input files
by limiting the length of expanded input lines during the (usually recursive) expansion of user defined strings. Resource hogging found by jsg@ with afl.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.76
1 files changed, 4 insertions, 2 deletions
diff --git a/roff.7 b/roff.7
index 15f74e30..98957c6e 100644
--- a/roff.7
+++ b/roff.7
@@ -543,8 +543,10 @@ one explicit newline character.
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.
+to a large, but finite number, and
+.Xr mandoc 1
+also limits the length of the expanded input line.
+Do not rely on the exact values of these limits.
.Ss \&dei
Define a
.Nm