summaryrefslogtreecommitdiffstats
path: root/regress/tbl
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-06-11 16:04:36 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-06-11 16:04:36 +0000
commit818668a067fce10e78f5f5098bed05373f3338cf (patch)
treedbe3dba509cdc25ea9410027a003f6c37a44abb5 /regress/tbl
parentef195046e60def3f6de6b879bec45de18894e56a (diff)
downloadmandoc-818668a067fce10e78f5f5098bed05373f3338cf.tar.gz
Do not access a NULL pointer if a table contains a horizontal line
next to a table line having fewer columns than the table as a whole. Bug found by Stephen Gregoratto <dev at sgregoratto dot me> with aerc-config(5).
Diffstat (limited to 'regress/tbl')
-rw-r--r--regress/tbl/layout/Makefile4
-rw-r--r--regress/tbl/layout/shortlines.in49
-rw-r--r--regress/tbl/layout/shortlines.out_ascii48
3 files changed, 99 insertions, 2 deletions
diff --git a/regress/tbl/layout/Makefile b/regress/tbl/layout/Makefile
index 9cc65754..a56cbc2f 100644
--- a/regress/tbl/layout/Makefile
+++ b/regress/tbl/layout/Makefile
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile,v 1.2 2015/01/30 00:27:09 schwarze Exp $
+# $OpenBSD: Makefile,v 1.4 2019/06/11 15:40:41 schwarze Exp $
REGRESS_TARGETS = center complex empty emptyline
-REGRESS_TARGETS += lines lines-nogroff numbers span
+REGRESS_TARGETS += lines lines-nogroff numbers shortlines span
LINT_TARGETS = complex empty
# groff-1.22.3 defects:
diff --git a/regress/tbl/layout/shortlines.in b/regress/tbl/layout/shortlines.in
new file mode 100644
index 00000000..f6434619
--- /dev/null
+++ b/regress/tbl/layout/shortlines.in
@@ -0,0 +1,49 @@
+.\" $OpenBSD: shortlines.in,v 1.1 2019/06/11 15:40:41 schwarze Exp $
+.TH TBL-LAYOUT-SHORTLINES 1 "June 11, 2019"
+.SH NAME
+tbl-layout-shortlines \- table lines of different length
+.SH DESCRIPTION
+normal text
+.TS
+allbox tab(:);
+L L
+L
+L L.
+left:right
+short
+left:right
+.TE
+.sp
+.TS
+allbox tab(:);
+L L
+L
+L
+L L.
+left:right
+first short
+second short
+left:right
+.TE
+.sp
+.TS
+allbox tab(:);
+L L L
+L L
+L.
+left:middle:right
+short:line
+very short
+.TE
+.sp
+.TS
+allbox tab(:);
+L
+L L
+L L L.
+very short
+short:line
+left:middle:right
+.TE
+
+
diff --git a/regress/tbl/layout/shortlines.out_ascii b/regress/tbl/layout/shortlines.out_ascii
new file mode 100644
index 00000000..02fe01d7
--- /dev/null
+++ b/regress/tbl/layout/shortlines.out_ascii
@@ -0,0 +1,48 @@
+TBL-LAYOUT-SHORTLINES(1) General Commands Manual TBL-LAYOUT-SHORTLINES(1)
+
+
+
+NNAAMMEE
+ tbl-layout-shortlines - table lines of different length
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +------+-------+
+ |left | right |
+ +------+-------+
+ |short | |
+ +------+-------+
+ |left | right |
+ +------+-------+
+
+ +-------------+-------+
+ |left | right |
+ +-------------+-------+
+ |first short | |
+ +-------------+-------+
+ |second short | |
+ +-------------+-------+
+ |left | right |
+ +-------------+-------+
+
+ +-----------+--------+-------+
+ |left | middle | right |
+ +-----------+--------+-------+
+ |short | line | |
+ +-----------+--------+-------+
+ |very short | | |
+ +-----------+--------+-------+
+
+ +-----------+--------+-------+
+ |very short | | |
+ +-----------+--------+-------+
+ |short | line | |
+ +-----------+--------+-------+
+ |left | middle | right |
+ +-----------+--------+-------+
+
+
+
+
+OpenBSD June 11, 2019 TBL-LAYOUT-SHORTLINES(1)