diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2020-06-11 16:12:15 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2020-06-11 16:12:15 +0000 |
commit | f816b7e8f181aa69c5c1892c4532715d6ca97dfa (patch) | |
tree | 435213bb2cfdd06229b5d3fc2c93c29fb81e158a | |
parent | f17d32e8799a8458fb8f3f9079ac0c5a88ab6a7d (diff) |
Fix a regression in rev. 1.238 (2019/07/26):
Pass the right object to html_reset() or it will crash
when rendering more than one manual page to HTML in a row.
Bug reported by Abel Romero Perez <romeroperezabel at gmail dot com>.
Ingo came up with the same diff and I'm borrowing his draft commit
message. ok schwarze@
-rw-r--r-- | usr.bin/mandoc/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index e3880cf2521..7c99ccd6ee1 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.251 2020/04/02 22:10:27 schwarze Exp $ */ +/* $OpenBSD: main.c,v 1.252 2020/06/11 16:12:14 otto Exp $ */ /* * Copyright (c) 2010-2012, 2014-2020 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> @@ -874,7 +874,7 @@ parse(struct mparse *mp, int fd, const char *file, if (outst->outdata == NULL) outdata_alloc(outst, outconf); else if (outst->outtype == OUTT_HTML) - html_reset(outst); + html_reset(outst->outdata); mandoc_xr_reset(); meta = mparse_result(mp); |