diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-27 16:20:31 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-27 16:20:31 +0000 |
commit | 45fbe869155402e8d8a4dbfce5516c55d9563890 (patch) | |
tree | 0550f388cba73096a3c059034a7fb67ed37871b9 /mdoc_term.c | |
parent | 40f5062cf187d9df1882d91992550749011bdfdf (diff) | |
download | mandoc-45fbe869155402e8d8a4dbfce5516c55d9563890.tar.gz |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index af662bc3..379a0356 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -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); |