From 0ddce0ae89b8662748b4054580c1cf7d7b0b6879 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 3 Sep 2019 12:30:35 +0000 Subject: oops, fix use after free in previous --- usr.bin/mandoc/html.c | 9 +++++---- 1 file 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 * Copyright (c) 2011-2015, 2017-2019 Ingo Schwarze @@ -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; } -- cgit v1.2.3