aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.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_term.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_term.c')
-rw-r--r--mdoc_term.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index f1825ccd..08a32850 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.293 2014/11/25 20:00:01 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.294 2014/11/27 16:20:31 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -91,7 +91,6 @@ static int termp_bt_pre(DECL_ARGS);
static int termp_bx_pre(DECL_ARGS);
static int termp_cd_pre(DECL_ARGS);
static int termp_d1_pre(DECL_ARGS);
-static int termp_es_pre(DECL_ARGS);
static int termp_ex_pre(DECL_ARGS);
static int termp_fa_pre(DECL_ARGS);
static int termp_fd_pre(DECL_ARGS);
@@ -111,6 +110,7 @@ static int termp_quote_pre(DECL_ARGS);
static int termp_rs_pre(DECL_ARGS);
static int termp_rv_pre(DECL_ARGS);
static int termp_sh_pre(DECL_ARGS);
+static int termp_skip_pre(DECL_ARGS);
static int termp_sm_pre(DECL_ARGS);
static int termp_sp_pre(DECL_ARGS);
static int termp_ss_pre(DECL_ARGS);
@@ -183,7 +183,7 @@ static const struct termact termacts[MDOC_MAX] = {
{ termp_quote_pre, termp_quote_post }, /* Bq */
{ termp_xx_pre, NULL }, /* Bsx */
{ termp_bx_pre, NULL }, /* Bx */
- { NULL, NULL }, /* Db */
+ { termp_skip_pre, NULL }, /* Db */
{ NULL, NULL }, /* Dc */
{ termp_quote_pre, termp_quote_post }, /* Do */
{ termp_quote_pre, termp_quote_post }, /* Dq */
@@ -235,7 +235,7 @@ static const struct termact termacts[MDOC_MAX] = {
{ termp_quote_pre, termp_quote_post }, /* Bro */
{ NULL, NULL }, /* Brc */
{ NULL, termp____post }, /* %C */
- { termp_es_pre, NULL }, /* Es */
+ { termp_skip_pre, NULL }, /* Es */
{ termp_quote_pre, termp_quote_post }, /* En */
{ termp_xx_pre, NULL }, /* Dx */
{ NULL, termp____post }, /* %Q */
@@ -1838,7 +1838,7 @@ termp_sp_pre(DECL_ARGS)
}
static int
-termp_es_pre(DECL_ARGS)
+termp_skip_pre(DECL_ARGS)
{
return(0);