summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2019-09-03 12:30:34 +0000
committerschwarze <schwarze@openbsd.org>2019-09-03 12:30:34 +0000
commitf1a57f6e8a92826de6b12673f83e9102fd4955de (patch)
treec0f610107048af792f529c509daf7e2266c3e3c8
parentReplace empty body of while loop with continue statement. (diff)
downloadwireguard-openbsd-f1a57f6e8a92826de6b12673f83e9102fd4955de.tar.xz
wireguard-openbsd-f1a57f6e8a92826de6b12673f83e9102fd4955de.zip
oops, fix use after free in previous
-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;
}