* mandoc: oops, fix use after free in previous
@ 2019-09-03 12:31 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-09-03 12:31 UTC (permalink / raw)
To: source
Log Message:
-----------
oops, fix use after free in previous
Modified Files:
--------------
mandoc:
html.c
Revision Data
-------------
Index: html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/html.c,v
retrieving revision 1.258
retrieving revision 1.259
diff -Lhtml.c -Lhtml.c -u -p -r1.258 -r1.259
--- html.c
+++ html.c
@@ -271,21 +271,18 @@ print_metaf(struct html *h)
void
html_close_paragraph(struct html *h)
{
- struct tag *t;
+ struct tag *this, *next;
+ int flags;
- for (t = h->tag; t != NULL && t->closed == 0; t = t->next) {
- switch(t->tag) {
- case TAG_P:
- case TAG_PRE:
- print_tagq(h, t);
+ this = h->tag;
+ for (;;) {
+ next = this->next;
+ flags = htmltags[this->tag].flags;
+ if (flags & (HTML_INPHRASE | HTML_TOPHRASE))
+ print_ctag(h, this);
+ if ((flags & HTML_INPHRASE) == 0)
break;
- case TAG_A:
- print_tagq(h, t);
- continue;
- default:
- continue;
- }
- break;
+ this = next;
}
}
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-03 12:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 12:31 mandoc: oops, fix use after free in previous schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).