diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-02-12 14:19:01 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-02-12 14:19:01 +0000 |
commit | 34589e401a21bcc56e2bd67317e1b63d18fac8ef (patch) | |
tree | a483bd36c1dfb7a1a7bf19046591526f3a269243 /regress/eqn/matrix | |
parent | 569cfcee61560d07f2e68e68d200da64b2c10f7e (diff) | |
download | mandoc-34589e401a21bcc56e2bd67317e1b63d18fac8ef.tar.gz |
Do not access a NULL pointer if a matrix or square root are empty.
Crashes found by tb@ with afl(1).
Diffstat (limited to 'regress/eqn/matrix')
-rw-r--r-- | regress/eqn/matrix/Makefile | 4 | ||||
-rw-r--r-- | regress/eqn/matrix/empty.in | 17 | ||||
-rw-r--r-- | regress/eqn/matrix/empty.out_ascii | 9 | ||||
-rw-r--r-- | regress/eqn/matrix/empty.out_html | 1 |
4 files changed, 29 insertions, 2 deletions
diff --git a/regress/eqn/matrix/Makefile b/regress/eqn/matrix/Makefile index a48306f2..8c2b50bb 100644 --- a/regress/eqn/matrix/Makefile +++ b/regress/eqn/matrix/Makefile @@ -1,6 +1,6 @@ # $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ -REGRESS_TARGETS = basic -HTML_TARGETS = basic +REGRESS_TARGETS = basic empty +HTML_TARGETS = basic empty .include <bsd.regress.mk> diff --git a/regress/eqn/matrix/empty.in b/regress/eqn/matrix/empty.in new file mode 100644 index 00000000..fda70b2f --- /dev/null +++ b/regress/eqn/matrix/empty.in @@ -0,0 +1,17 @@ +.Dd February 12, 2017 +.Dt MATRIX-EMPTY 1 +.Os OpenBSD +.Sh NAME +.Nm matrix-empty +.Nd empty matrixes +.Sh DESCRIPTION +initial text +.EQ +left ( +matrix { } +right ) +left ( +matrix +right ) +.EN +final text diff --git a/regress/eqn/matrix/empty.out_ascii b/regress/eqn/matrix/empty.out_ascii new file mode 100644 index 00000000..ca555848 --- /dev/null +++ b/regress/eqn/matrix/empty.out_ascii @@ -0,0 +1,9 @@ +MATRIX-EMPTY(1) General Commands Manual MATRIX-EMPTY(1) + +NNAAMMEE + mmaattrriixx--eemmppttyy - empty matrixes + +DDEESSCCRRIIPPTTIIOONN + initial text () () final text + +OpenBSD February 12, 2017 OpenBSD diff --git a/regress/eqn/matrix/empty.out_html b/regress/eqn/matrix/empty.out_html new file mode 100644 index 00000000..4578d361 --- /dev/null +++ b/regress/eqn/matrix/empty.out_html @@ -0,0 +1 @@ +<mrow><mfenced open="(" close=")"><mrow></mrow></mfenced><mfenced open="(" close=")"><mrow></mrow></mfenced></mrow> |