summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-19 17:31:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-19 17:31:55 +0000
commit353b2f1dc066ac2d6ed406b726fb8ac18cabab5f (patch)
tree13e6c3f5583385e813ad84644cb8e5458f1eeeca
parent255440e006df46680a8a1d6d9477320941812ff2 (diff)
downloadmandoc-353b2f1dc066ac2d6ed406b726fb8ac18cabab5f.tar.gz
Do not dereference a NULL pointer if a .Bl macro has
no -type, -width, -offset or -compact arguments whatsoever; this got broken in rev. 1.238.
-rw-r--r--mdoc_validate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index ae6acec1..f97f1dfb 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -529,7 +529,7 @@ pre_bl(PRE_ARGS)
* ones. If we find no list type, we default to LIST_item.
*/
- wa = n->args->argv;
+ wa = (n->args == NULL) ? NULL : n->args->argv;
mdoclt = MDOC_ARG_MAX;
for (i = 0; n->args && i < (int)n->args->argc; i++) {
argv = n->args->argv + i;