diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-12-10 20:58:56 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-12-10 20:58:56 +0000 |
commit | 81689ffd1549a3846ce2cda5142974f268795426 (patch) | |
tree | 6f8b0f3cae35bd5cb71058ee27a6ad21750b52c3 /mandoc.h | |
parent | 7642cc3b7f2a5238132e168211d75b0d999161b6 (diff) | |
download | mandoc-81689ffd1549a3846ce2cda5142974f268795426.tar.gz mandoc-81689ffd1549a3846ce2cda5142974f268795426.tar.zst mandoc-81689ffd1549a3846ce2cda5142974f268795426.zip |
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@
Diffstat (limited to 'mandoc.h')
-rw-r--r-- | mandoc.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 <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 */ |