help / color / mirror / Atom feed
Subject: mandoc: When looking for the next block to tag, we aren't interested in
Date: Wed, 8 Jun 2022 11:32:16 -0500 (EST)	[thread overview]
Message-ID: <> (raw)

Log Message:
When looking for the next block to tag, we aren't interested in children
of the current block but really want the next block instead.  This fixes
a segfault reported by Evan Silberman <evan at jklol dot net> on bugs@.

Modified Files:

Revision Data
Index: mdoc_validate.c
RCS file: /home/cvs/mandoc/mandoc/mdoc_validate.c,v
retrieving revision 1.390
retrieving revision 1.391
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.390 -r1.391
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -1113,7 +1113,8 @@ post_tg(POST_ARGS)
 	/* Find the next node. */
 	n = mdoc->last;
 	for (nn = n; nn != NULL; nn = nn->parent) {
-		if (nn->next != NULL) {
+		if (nn->type != ROFFT_HEAD && nn->type != ROFFT_BODY &&
+		    nn->type != ROFFT_TAIL && nn->next != NULL) {
 			nn = nn->next;
 To unsubscribe send an email to

                 reply	other threads:[~2022-06-08 16:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).