diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-12-10 20:58:56 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-12-10 20:58:56 +0000 |
commit | 81689ffd1549a3846ce2cda5142974f268795426 (patch) | |
tree | 6f8b0f3cae35bd5cb71058ee27a6ad21750b52c3 /roff.7 | |
parent | 7642cc3b7f2a5238132e168211d75b0d999161b6 (diff) | |
download | mandoc-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 'roff.7')
-rw-r--r-- | roff.7 | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,4 +1,4 @@ -.\" $Id: roff.7,v 1.15 2010/12/06 16:37:32 kristaps Exp $ +.\" $Id: roff.7,v 1.16 2010/12/10 20:58:56 schwarze Exp $ .\" .\" Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 6 2010 $ +.Dd $Mdocdate: December 10 2010 $ .Dt ROFF 7 .Os .Sh NAME @@ -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 |