The code already pays attention not to close the same block twice.
authorschwarze <schwarze@openbsd.org>
Mon, 22 Dec 2014 23:26:20 +0000 (23:26 +0000)
committerschwarze <schwarze@openbsd.org>
Mon, 22 Dec 2014 23:26:20 +0000 (23:26 +0000)
commite0db1b2460109644752a76a4e1e6b33682ac94ad
treee8a4a2b0776f927c1307c11be33f3ac9fa2248fd
parent695aa31c1961c5c1cb62381c6f12bbf71bfa033e
The code already pays attention not to close the same block twice.
Similarly, avoid having the same block break two other blocks.
In some situations, this could lead to an endless loop in rew_sub()
found by jsg@ with afl.
Minimal example:  .Po Ao Pc Bo Pc Ac Bc
regress/usr.bin/mandoc/mdoc/Makefile
regress/usr.bin/mandoc/mdoc/break/Makefile [new file with mode: 0644]
regress/usr.bin/mandoc/mdoc/break/twice.in [new file with mode: 0644]
regress/usr.bin/mandoc/mdoc/break/twice.out_ascii [new file with mode: 0644]
regress/usr.bin/mandoc/mdoc/break/twice.out_lint [new file with mode: 0644]
usr.bin/mandoc/mdoc_macro.c