From aabe46b7c8c0f9da0079b71a1eb350536961bc3f Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 16 Feb 2017 09:47:31 +0000 Subject: Fix block scoping error if an explicit block is broken by two implicit blocks (.Aq Bq Po .Pc) that left the outer breaker open and could in exceptional cases, like between .Bl and .It, cause tree corruption leading to NULL dereference. Found by tb@ with afl(1). While here, do not mark intermediate ENDBODY markers as broken. --- regress/mdoc/break/twice.out_ascii | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'regress/mdoc/break/twice.out_ascii') diff --git a/regress/mdoc/break/twice.out_ascii b/regress/mdoc/break/twice.out_ascii index c6d0149d..75302910 100644 --- a/regress/mdoc/break/twice.out_ascii +++ b/regress/mdoc/break/twice.out_ascii @@ -4,12 +4,16 @@ NNAAMMEE bbrreeaakk--ttwwiiccee - breaking the same block twice DDEESSCCRRIIPPTTIIOONN - Standard case, explicit: [bo {bro + Standard case, fully explicit: [bo {bro - Standard case, implicit: [bo {bro + Standard case, implicit broken block: [bo {bro - Two of the same kind, explicit: [bo [bo + Two of the same kind, fully explicit: [bo [bo - Two of the same kind, implicit: [bo [bo + Two of the same kind, implicit broken block: [bo [bo -OpenBSD February 12, 2015 OpenBSD + Two implicit breakers: pc) + + -- it + +OpenBSD February 16, 2017 OpenBSD -- cgit v1.2.3-56-ge451