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 o6UHE9sb029751 for ; Fri, 30 Jul 2010 13:14:09 -0400 (EDT) Received: (from joerg@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o6UHE9Jn003056; Fri, 30 Jul 2010 13:14:09 -0400 (EDT) Date: Fri, 30 Jul 2010 13:14:09 -0400 (EDT) Message-Id: <201007301714.o6UHE9Jn003056@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: Don't crash for the following test case as reported by Jordan X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Don't crash for the following test case as reported by Jordan Gordeev: .Bl -tag .It foo ... Modified Files: -------------- mdocml: mdoc_action.c Revision Data ------------- Index: mdoc_action.c =================================================================== RCS file: /home/joerg/cvsroot/mdocml/mdoc_action.c,v retrieving revision 1.77 retrieving revision 1.78 diff -Lmdoc_action.c -Lmdoc_action.c -u -p -r1.77 -r1.78 --- mdoc_action.c +++ mdoc_action.c @@ -660,6 +660,13 @@ post_bl_tagwidth(POST_ARGS) assert(MDOC_BLOCK == nn->type); nn = nn->head->child; + if (nn == NULL) { + /* No -width for .Bl and first .It is emtpy */ + if ( ! mdoc_nmsg(m, n, MANDOCERR_NOWIDTHARG)) + return(0); + break; + } + if (MDOC_TEXT == nn->type) { sz = strlen(nn->string) + 1; break; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv