summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2019-09-03 12:30:35 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2019-09-03 12:30:35 +0000
commit0ddce0ae89b8662748b4054580c1cf7d7b0b6879 (patch)
tree136ffc3c974e474405e7c3c7c6a73dece8e19728 /usr.bin/mandoc
parenta194fd089dd55e8cf0e1e5bc8fbdbbb475245d22 (diff)
oops, fix use after free in previous
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/html.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/mandoc/html.c b/usr.bin/mandoc/html.c
index b8f39a459d6..ab164e4f827 100644
--- a/usr.bin/mandoc/html.c
+++ b/usr.bin/mandoc/html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: html.c,v 1.129 2019/09/03 12:03:05 schwarze Exp $ */
+/* $OpenBSD: html.c,v 1.130 2019/09/03 12:30:34 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -270,14 +270,15 @@ void
html_close_paragraph(struct html *h)
{
struct tag *this, *next;
+ int flags;
this = h->tag;
for (;;) {
next = this->next;
- if (htmltags[this->tag].flags &
- (HTML_INPHRASE | HTML_TOPHRASE))
+ flags = htmltags[this->tag].flags;
+ if (flags & (HTML_INPHRASE | HTML_TOPHRASE))
print_ctag(h, this);
- if ((htmltags[this->tag].flags & HTML_INPHRASE) == 0)
+ if ((flags & HTML_INPHRASE) == 0)
break;
this = next;
}