From: joerg@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Don't crash for the following test case as reported by Jordan
Date: Fri, 30 Jul 2010 13:14:09 -0400 (EDT) [thread overview]
Message-ID: <201007301714.o6UHE9Jn003056@krisdoz.my.domain> (raw)
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
reply other threads:[~2010-07-30 17:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201007301714.o6UHE9Jn003056@krisdoz.my.domain \
--to=joerg@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).