source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: When looking for the next block to tag, we aren't interested in
@ 2022-06-08 16:32 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2022-06-08 16:32 UTC (permalink / raw)
  To: source

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:
--------------
    mandoc:
        mdoc_validate.c

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;
 			break;
 		}
--
 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:[~2022-06-08 16:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 16:32 mandoc: When looking for the next block to tag, we aren't interested in 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).