aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-27 16:20:31 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-27 16:20:31 +0000
commitae5f77f4afb4eacc8500ded5455086d6242ae946 (patch)
treea14a4377b896bcb23d2b71d2b57d9b3c825b0a78 /mdoc_man.c
parent63db09932dec56e5bb940db7c81df9660ab0c0d0 (diff)
downloadmandoc-ae5f77f4afb4eacc8500ded5455086d6242ae946.tar.gz
mandoc-ae5f77f4afb4eacc8500ded5455086d6242ae946.tar.zst
mandoc-ae5f77f4afb4eacc8500ded5455086d6242ae946.zip
Fix the obsolete .Db (toggle debug mode) macro to ignore its arguments
and not trigger an assertion when there is more than one argument; the latter found by jsg@ with afl.
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 75b68e62..33e8b2cb 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.74 2014/11/19 22:00:37 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.75 2014/11/27 16:20:31 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -84,7 +84,7 @@ static int pre_dl(DECL_ARGS);
static int pre_en(DECL_ARGS);
static int pre_enc(DECL_ARGS);
static int pre_em(DECL_ARGS);
-static int pre_es(DECL_ARGS);
+static int pre_skip(DECL_ARGS);
static int pre_ex(DECL_ARGS);
static int pre_fa(DECL_ARGS);
static int pre_fd(DECL_ARGS);
@@ -183,7 +183,7 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ cond_body, pre_enc, post_enc, "[", "]" }, /* Bq */
{ NULL, pre_ux, NULL, "BSD/OS", NULL }, /* Bsx */
{ NULL, pre_bx, NULL, NULL, NULL }, /* Bx */
- { NULL, NULL, NULL, NULL, NULL }, /* Db */
+ { NULL, pre_skip, NULL, NULL, NULL }, /* Db */
{ NULL, NULL, NULL, NULL, NULL }, /* Dc */
{ cond_body, pre_enc, post_enc, "\\(lq", "\\(rq" }, /* Do */
{ cond_body, pre_enc, post_enc, "\\(lq", "\\(rq" }, /* Dq */
@@ -235,7 +235,7 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ cond_body, pre_enc, post_enc, "{", "}" }, /* Bro */
{ NULL, NULL, NULL, NULL, NULL }, /* Brc */
{ NULL, NULL, post_percent, NULL, NULL }, /* %C */
- { NULL, pre_es, NULL, NULL, NULL }, /* Es */
+ { NULL, pre_skip, NULL, NULL, NULL }, /* Es */
{ cond_body, pre_en, post_en, NULL, NULL }, /* En */
{ NULL, pre_ux, NULL, "DragonFly", NULL }, /* Dx */
{ NULL, NULL, post_percent, NULL, NULL }, /* %Q */
@@ -1132,13 +1132,6 @@ post_eo(DECL_ARGS)
}
static int
-pre_es(DECL_ARGS)
-{
-
- return(0);
-}
-
-static int
pre_fa(DECL_ARGS)
{
int am_Fa;
@@ -1678,6 +1671,13 @@ pre_rv(DECL_ARGS)
}
static int
+pre_skip(DECL_ARGS)
+{
+
+ return(0);
+}
+
+static int
pre_sm(DECL_ARGS)
{