When the head of a list item is extended with a partial explicit
authorschwarze <schwarze@openbsd.org>
Thu, 18 Dec 2014 19:22:47 +0000 (19:22 +0000)
committerschwarze <schwarze@openbsd.org>
Thu, 18 Dec 2014 19:22:47 +0000 (19:22 +0000)
commitd26e35c25161278a22aa605546c24ef59a097fa5
tree80e1e08f703299a6de4bdc10693aeacff8af0b1c
parenta851fda76f8c1f981da31fd73cee93d984c4dff0
When the head of a list item is extended with a partial explicit
macro (for example .Xo) and never closed again, the item ends up
without a body block.  This can even happen for list types that
usually don't have heads in the first place.  So even in this
case, check for the existence of the body before accessing it.
NULL pointer access found by jsg@ with afl.
regress/usr.bin/mandoc/mdoc/Bl/break.in
regress/usr.bin/mandoc/mdoc/Bl/break.out_ascii
regress/usr.bin/mandoc/mdoc/Bl/break.out_lint
usr.bin/mandoc/mdoc_validate.c