From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 74e6c3a1; for ; Mon, 20 Apr 2015 04:49:23 -0500 (EST) Date: Mon, 20 Apr 2015 04:49:23 -0500 (EST) Message-Id: <16727157270666992798.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Avoid out-of-bounds read access before the beginning of the X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Avoid out-of-bounds read access before the beginning of the mdoc_macros[] array. This sometimes prevented proper warnings about text nodes preceding the first section header. Modified Files: -------------- mdocml: mdoc_validate.c Revision Data ------------- Index: mdoc_validate.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_validate.c,v retrieving revision 1.289 retrieving revision 1.290 diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.289 -r1.290 --- mdoc_validate.c +++ mdoc_validate.c @@ -1562,7 +1562,8 @@ post_root(POST_ARGS) /* Check that we begin with a proper `Sh'. */ n = mdoc->first->child; - while (n != NULL && mdoc_macros[n->tok].flags & MDOC_PROLOGUE) + while (n != NULL && n->tok != TOKEN_NONE && + mdoc_macros[n->tok].flags & MDOC_PROLOGUE) n = n->next; if (n == NULL) -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv