From 81689ffd1549a3846ce2cda5142974f268795426 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 10 Dec 2010 20:58:56 +0000 Subject: 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. "check it in" kristaps@ --- mandoc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mandoc.h') diff --git a/mandoc.h b/mandoc.h index 03c93f3e..14687e0b 100644 --- a/mandoc.h +++ b/mandoc.h @@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.32 2010/12/06 16:55:35 kristaps Exp $ */ +/* $Id: mandoc.h,v 1.33 2010/12/10 20:58:56 schwarze Exp $ */ /* * Copyright (c) 2010 Kristaps Dzonsons * @@ -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 */ -- cgit v1.2.3