summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-09-06 16:24:25 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-09-06 16:24:25 +0000
commit785dd8d378c339655da655e104ae8aa6a48b2ecd (patch)
tree02e8c71df8c5133209adf86c28ba7bff794cb530
parent1fcaef01ac4fcbd536bd4717651b4b787b4e0ae7 (diff)
downloadmandoc-785dd8d378c339655da655e104ae8aa6a48b2ecd.tar.gz
fix a NULL pointer access on deroff() failure;
could be triggered with '.SS ""'; reported by Michael <Stapelberg at debian>
-rw-r--r--html.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/html.c b/html.c
index 1f1d8729..e644fa21 100644
--- a/html.c
+++ b/html.c
@@ -250,6 +250,8 @@ html_make_id(const struct roff_node *n)
buf = NULL;
deroff(&buf, n);
+ if (buf == NULL)
+ return NULL;
/* http://www.w3.org/TR/html5/dom.html#the-id-attribute */