summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'read.c')
-rw-r--r--read.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/read.c b/read.c
index ac0b23be..9c222eb1 100644
--- a/read.c
+++ b/read.c
@@ -662,6 +662,8 @@ mparse_alloc(enum mparset inttype, enum mandoclevel wlevel, mandocmsg mmsg, void
{
struct mparse *curp;
+ assert(wlevel <= MANDOCLEVEL_FATAL);
+
curp = mandoc_calloc(1, sizeof(struct mparse));
curp->wlevel = wlevel;