summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-12-09 23:01:19 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-12-09 23:01:19 +0000
commitf1e79ec68713661173a39689ac7ec54384c9e6eb (patch)
treebabcca5dc5a7aa2a2a3fb31ebf9a38d0edbc4f83 /usr.bin/mandoc/mandoc.h
parentfbbf922c8d34a7f92addc03a7578776c5853b61c (diff)
Abort endless loops during roff macro and string expansion.
For now, use the simplest conceivable approach, like groff does: Just a fixed, ugly input stack limit. Kristaps@ agrees.
Diffstat (limited to 'usr.bin/mandoc/mandoc.h')
-rw-r--r--usr.bin/mandoc/mandoc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mandoc.h b/usr.bin/mandoc/mandoc.h
index b6ce8685677..215f8d53650 100644
--- a/usr.bin/mandoc/mandoc.h
+++ b/usr.bin/mandoc/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.24 2010/12/07 00:08:52 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.25 2010/12/09 23:01:18 schwarze Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -101,6 +101,7 @@ enum mandocerr {
MANDOCERR_ERROR, /* ===== start of errors ===== */
+ MANDOCERR_ROFFLOOP, /* input stack limit exceeded, infinite loop? */
MANDOCERR_BADCHAR, /* skipping bad character */
MANDOCERR_NOTEXT, /* skipping text before the first section header */
MANDOCERR_MACRO, /* skipping unknown macro */