From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p33ABPqU002325 for ; Sun, 3 Apr 2011 06:11:26 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p33ABPTt019253; Sun, 3 Apr 2011 06:11:25 -0400 (EDT) Date: Sun, 3 Apr 2011 06:11:25 -0400 (EDT) Message-Id: <201104031011.p33ABPTt019253@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: If wlevel in mparse_alloc() is greater than MANDOCLEVEL_FATAL, X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- If wlevel in mparse_alloc() is greater than MANDOCLEVEL_FATAL, we'll throw assertions due to per-file-error not being properly set in mmsg(). This is reasonable behaviour (we shouldn't be able to ignore FATAL after all). Thus, make sure wlevel is sanitised. Modified Files: -------------- mdocml: read.c Revision Data ------------- Index: read.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/read.c,v retrieving revision 1.9 retrieving revision 1.10 diff -Lread.c -Lread.c -u -p -r1.9 -r1.10 --- read.c +++ read.c @@ -662,6 +662,8 @@ mparse_alloc(enum mparset inttype, enum { struct mparse *curp; + assert(wlevel <= MANDOCLEVEL_FATAL); + curp = mandoc_calloc(1, sizeof(struct mparse)); curp->wlevel = wlevel; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv