diff options
author | 2017-03-07 20:00:08 +0000 | |
---|---|---|
committer | 2017-03-07 20:00:08 +0000 | |
commit | 8ef8ebcf522a1fcfacc2601f9db3f97a55a3ddfd (patch) | |
tree | 6107e43fff96ef06836c6b9439d2a0e8f1d3f938 /regress/mdoc/Bd/nested.out_markdown | |
parent | 25af9c11f6cdc0ec8d58083464b2b38ba11a1426 (diff) | |
download | mandoc-8ef8ebcf522a1fcfacc2601f9db3f97a55a3ddfd.tar.gz mandoc-8ef8ebcf522a1fcfacc2601f9db3f97a55a3ddfd.tar.zst mandoc-8ef8ebcf522a1fcfacc2601f9db3f97a55a3ddfd.zip |
If a user-defined macro is aborted because it exceeds the stack
limit, usually due to infinite recursion, discard whatever remains
in all those open stack levels. Otherwise, insane constructions
like the following could generate macros of enormous size, causing
mandoc(1) to die from memory exhaustion:
.de m \" original macro definition
.m \" recursion to blow up the stack
.de m \" definition to be run during the call of .m marked (*)
very long plain text (some kilobytes)
.m \" expand the above a thousand times while unwinding the stack
.. \" end of the original definition
.m \" (*) recursively generate a ridiculously large macro
.. \" end of recursively generated definition
.m \" execute the giant macro, exhausting memory
Very creative abuse found by tb@ with afl(1).
Diffstat (limited to 'regress/mdoc/Bd/nested.out_markdown')
0 files changed, 0 insertions, 0 deletions