* mdocml: If wlevel in mparse_alloc() is greater than MANDOCLEVEL_FATAL,
@ 2011-04-03 10:11 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-04-03 10:11 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-03 10:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-03 10:11 mdocml: If wlevel in mparse_alloc() is greater than MANDOCLEVEL_FATAL, kristaps
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).