aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/mdoc/break/twice.in
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-16 09:47:31 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-16 09:47:31 +0000
commitaabe46b7c8c0f9da0079b71a1eb350536961bc3f (patch)
tree39fb19e2d44158549869c4fe305c6058e4ec8abc /regress/mdoc/break/twice.in
parent873dc9b1d77212924c035df9c1accfbb3a4a6a7e (diff)
downloadmandoc-aabe46b7c8c0f9da0079b71a1eb350536961bc3f.tar.gz
mandoc-aabe46b7c8c0f9da0079b71a1eb350536961bc3f.tar.zst
mandoc-aabe46b7c8c0f9da0079b71a1eb350536961bc3f.zip
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.
Diffstat (limited to 'regress/mdoc/break/twice.in')
-rw-r--r--regress/mdoc/break/twice.in19
1 files changed, 14 insertions, 5 deletions
diff --git a/regress/mdoc/break/twice.in b/regress/mdoc/break/twice.in
index 8853aec1..a8dda93f 100644
--- a/regress/mdoc/break/twice.in
+++ b/regress/mdoc/break/twice.in
@@ -1,11 +1,11 @@
-.Dd February 12, 2015
+.Dd February 16, 2017
.Dt BREAK-TWICE 1
.Os OpenBSD
.Sh NAME
.Nm break-twice
.Nd breaking the same block twice
.Sh DESCRIPTION
-Standard case, explicit:
+Standard case, fully explicit:
.Bo bo
.Bro bro
.Ao ao brc
@@ -13,12 +13,12 @@ Standard case, explicit:
.Bc ac
.Ac
.Pp
-Standard case, implicit:
+Standard case, implicit broken block:
.Bo bo
.Bro bro
.Aq aq brc Brc bc Bc eol
.Pp
-Two of the same kind, explicit:
+Two of the same kind, fully explicit:
.Bo bo
.Bo bo
.Ao ao bc
@@ -26,7 +26,16 @@ Two of the same kind, explicit:
.Bc ac
.Ac
.Pp
-Two of the same kind, implicit:
+Two of the same kind, implicit broken block:
.Bo bo
.Bo bo
.Aq aq bc Bc bc Bc eol
+.Pp
+Two implicit breakers:
+.Bl -dash
+.Aq aq Bq bq Po po
+pc
+.Pc
+.It
+it
+.El