From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16139 invoked from network); 8 Jun 2022 16:32:18 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 8 Jun 2022 16:32:18 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 64254c78 for ; Wed, 8 Jun 2022 11:32:16 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 6139c0f2 for ; Wed, 8 Jun 2022 11:32:16 -0500 (EST) Date: Wed, 8 Jun 2022 11:32:16 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: When looking for the next block to tag, we aren't interested in X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <3365acd332b23e3e@mandoc.bsd.lv> 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 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