Up to [local] / src / usr.bin / mandoc
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: OPENBSD_6_1_BASE
Revision 1.135 / (download) - annotate - [select for diffs], Tue Mar 7 20:00:02 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1
Changes since 1.134: +13 -9 lines
Diff to previous 1.134 (colored)
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).