[CFT][patch] mandoc: don't segfault on empty tbl(1) continuation blocks
Eygene Ryabinkin
rea at freebsd.org
Tue Jul 16 19:31:32 UTC 2019
Good day.
Attached is the patch that makes built-in tbl(1) processor in mandoc
to avoid dumping core when it renders the table with empty "T{ T}"
block and horizontally-ruled table.
The simplest way to reproduce the issue is to either
- run 'man notmuch-config' with mail/notmuch installed;
- run 'mandoc tests/empty-table-cdata.1' against the attached
test-only manpage.
With the patch applied, one can utilize 'make check': regression
test was added. Perhaps an invocation of
{{{
mtree -deU -f /usr/src/etc/mtree/BSD.tests.dist -p /usr/tests
}}}
will be needed to run 'make check' without remaking/installing
the world.
The patch is for the fresh -CURRENT. Be interested in any results
of its application and usage.
Thanks!
P.S.: please, CC me: I am not subscribed to the list.
--
Eygene Ryabinkin ,,,^..^,,,
[ Life's unfair - but root password helps! | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mandoc-fix-empty-cdata-crash.patch
Type: text/x-diff
Size: 6021 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20190716/ddfa8bc5/attachment.patch>
-------------- next part --------------
.\" $FreeBSD$
.
.TH EMPTY-TABLE-CDATA 1 1970-01-01
.SH Empty table cdata test for tbl processor
.
.PP
The following table should not make mandoc to dump core:
.
.TS
|l|l|.
_
A test
_
table T{
T}
_
.TE
.
.SH Author
.PP
Eygene Ryabinkin, <rea at FreeBSD.org>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 358 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20190716/ddfa8bc5/attachment.sig>
More information about the freebsd-current
mailing list