source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Don't crash for the following test case as reported by Jordan
@ 2010-07-30 17:14 joerg
  0 siblings, 0 replies; only message in thread
From: joerg @ 2010-07-30 17:14 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-30 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-30 17:14 mdocml: Don't crash for the following test case as reported by Jordan joerg

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).