From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (joerg@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pAIEwPRq018957 for ; Fri, 18 Nov 2011 09:58:25 -0500 (EST) Received: (from joerg@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id pAIEwOCM016755; Fri, 18 Nov 2011 09:58:24 -0500 (EST) Date: Fri, 18 Nov 2011 09:58:24 -0500 (EST) Message-Id: <201111181458.pAIEwOCM016755@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: joerg@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Bail out explicitly on invalid .Rs content like: .Rs plain text X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Bail out explicitly on invalid .Rs content like: .Rs plain text .Re This avoids a crash on invalid. Modified Files: -------------- mdocml: mdoc_validate.c Revision Data ------------- Index: mdoc_validate.c =================================================================== RCS file: /home/joerg/cvsroot/mdocml/mdoc_validate.c,v retrieving revision 1.177 retrieving revision 1.178 diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.177 -r1.178 --- mdoc_validate.c +++ mdoc_validate.c @@ -1693,6 +1693,10 @@ post_rs(POST_ARGS) mdoc_node_delete(mdoc, nn); } + /* Bail out early if a plain text node is found inside .Rs. */ + if (NULL == mdoc->last->child) + return(1); + /* * The full `Rs' block needs special handling to order the * sub-elements according to `rsord'. Pick through each element -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv