CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2016/08/20 11:58:09
Modified files: usr.bin/mandoc : mdoc_macro.c regress/usr.bin/mandoc/mdoc/break: Makefile Added files: regress/usr.bin/mandoc/mdoc/break: notopen.in notopen.out_ascii notopen.out_lint Log message: When a mismatching end macro occurs while at least two nested blocks are open, all except the innermost open block got a bogus MDOC_ENDED marker, in some situations triggering segfaults down the road which tb@ found with afl(1). Fix the logic error by figuring out up front whether an end macro has a matching body, and if it hasn't, don't mark any blocks as broken.