source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Should termp_xx_pre() ever get called for a macro it cannot
@ 2013-05-18 17:47 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2013-05-18 17:47 UTC (permalink / raw)
  To: source

Log Message:
-----------
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.

Modified Files:
--------------
    mdocml:
        mdoc_term.c

Revision Data
-------------
Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.245
retrieving revision 1.246
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.245 -r1.246
--- mdoc_term.c
+++ mdoc_term.c
@@ -1756,7 +1756,8 @@ termp_xx_pre(DECL_ARGS)
 		pp = "UNIX";
 		break;
 	default:
-		break;
+		abort();
+		/* NOTREACHED */
 	}
 
 	term_word(p, pp);
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-18 17:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-18 17:47 mdocml: Should termp_xx_pre() ever get called for a macro it cannot schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).