diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-03 13:54:02 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-03 13:54:02 +0000 |
commit | 063741173fb7a72af87af9a708cc91a48d8c81b8 (patch) | |
tree | e7da9ec9b2f12b88083343b0fcc93b13663856dd | |
parent | 8c4c0ea22ab205fa87d8e0d34700b3b564fe3e23 (diff) | |
download | mandoc-063741173fb7a72af87af9a708cc91a48d8c81b8.tar.gz mandoc-063741173fb7a72af87af9a708cc91a48d8c81b8.tar.zst mandoc-063741173fb7a72af87af9a708cc91a48d8c81b8.zip |
Make sure we don't continue recursively parsing once we've exited with
failure (this had caused some segfaults with the new assert() call in
MAN_HALT and MDOC_HALT).
-rw-r--r-- | main.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.131 2011/01/01 22:27:08 kristaps Exp $ */ +/* $Id: main.c,v 1.132 2011/01/03 13:54:02 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -805,6 +805,14 @@ rerun: } /* + * If we encounter errors in the recursive parsebuf() + * call, make sure we don't continue parsing. + */ + + if (MANDOCLEVEL_FATAL <= file_status) + break; + + /* * If input parsers have not been allocated, do so now. * We keep these instanced betwen parsers, but set them * locally per parse routine since we can use different |