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 73798df7; for ; Fri, 30 Oct 2015 13:54:24 -0500 (EST) Date: Fri, 30 Oct 2015 13:54:24 -0500 (EST) Message-Id: <6891804715670096210.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: Do not access a NULL pointer when a .Bd macro has no arguments X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Do not access a NULL pointer when a .Bd macro has no arguments at all. Bug reported by krw@. Modified Files: -------------- mdocml: mdoc_state.c Revision Data ------------- Index: mdoc_state.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_state.c,v retrieving revision 1.2 retrieving revision 1.3 diff -Lmdoc_state.c -Lmdoc_state.c -u -p -r1.2 -r1.3 --- mdoc_state.c +++ mdoc_state.c @@ -195,6 +195,9 @@ state_bd(STATE_ARGS) (n->type != ROFFT_BODY || n->end != ENDBODY_NOT)) return; + if (n->parent->args == NULL) + return; + arg = n->parent->args->argv[0].arg; if (arg != MDOC_Literal && arg != MDOC_Unfilled) return; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv