diff options
author | 2017-09-06 16:24:25 +0000 | |
---|---|---|
committer | 2017-09-06 16:24:25 +0000 | |
commit | f5084633ecda9b0d4a97107e74935d50e1fa318a (patch) | |
tree | e52d8fea862e87ec6789810706af25d040d1f16c | |
parent | 61350a585130480332b7a72a422d6113c7d329bc (diff) | |
download | mandoc-f5084633ecda9b0d4a97107e74935d50e1fa318a.tar.gz mandoc-f5084633ecda9b0d4a97107e74935d50e1fa318a.tar.zst mandoc-f5084633ecda9b0d4a97107e74935d50e1fa318a.zip |
fix a NULL pointer access on deroff() failure;
could be triggered with '.SS ""';
reported by Michael <Stapelberg at debian>
-rw-r--r-- | html.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.219 2017/07/15 17:57:51 schwarze Exp $ */ +/* $Id: html.c,v 1.220 2017/09/06 16:24:25 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -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 */ |