aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-05-18 17:47:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-05-18 17:47:47 +0000
commit4c45e269ea164dca71f9a933c067b64485ea075f (patch)
treea92f8a55bfe9464404c3662e09cde7893aa488c3
parentfd975ee52323b5a37569bba943c722004161f5ec (diff)
downloadmandoc-4c45e269ea164dca71f9a933c067b64485ea075f.tar.gz
mandoc-4c45e269ea164dca71f9a933c067b64485ea075f.tar.zst
mandoc-4c45e269ea164dca71f9a933c067b64485ea075f.zip
Should termp_xx_pre() ever get called for a macro it cannot handle,
use abort(3), just like in the three other comparable cases in this file, instead of ignoring the problem and causing a null pointer access. Cosmetical issue reported by Ulrich Spoerlein <uqs@spoerlein.net> found by Coverity Scan CID 976115. No functional change.
-rw-r--r--mdoc_term.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 81e331e8..9079a66c 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.245 2012/11/17 00:26:33 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.246 2013/05/18 17:47:47 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -1756,7 +1756,8 @@ termp_xx_pre(DECL_ARGS)
pp = "UNIX";
break;
default:
- break;
+ abort();
+ /* NOTREACHED */
}
term_word(p, pp);