aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-18 03:10:11 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-18 03:10:11 +0000
commitbcb96064a93b17d1c9126fb86a01ede2ca704c61 (patch)
treeef09106e638f18d122b33be24689332198d549cd /mdoc.h
parent527dbfc8a6439fb7d7a2f2eb38f60e5d9142bf6c (diff)
downloadmandoc-bcb96064a93b17d1c9126fb86a01ede2ca704c61.tar.gz
mandoc-bcb96064a93b17d1c9126fb86a01ede2ca704c61.tar.zst
mandoc-bcb96064a93b17d1c9126fb86a01ede2ca704c61.zip
The code is already careful to not add items to lists that were
already closed. In this respect, also consider lists closed that have broken another block, their closure pending until the end of the broken block. This avoids syntax tree corruption leading to a NULL pointer access found by jsg@ with afl.
Diffstat (limited to 'mdoc.h')
-rw-r--r--mdoc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/mdoc.h b/mdoc.h
index f7c933d5..05e23992 100644
--- a/mdoc.h
+++ b/mdoc.h
@@ -1,4 +1,4 @@
-/* $Id: mdoc.h,v 1.132 2014/12/01 04:05:32 schwarze Exp $ */
+/* $Id: mdoc.h,v 1.133 2014/12/18 03:10:11 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -356,6 +356,7 @@ struct mdoc_node {
enum mdoct tok; /* tok or MDOC__MAX if none */
int flags;
#define MDOC_VALID (1 << 0) /* has been validated */
+#define MDOC_BREAK (1 << 1) /* has broken another block */
#define MDOC_EOS (1 << 2) /* at sentence boundary */
#define MDOC_LINE (1 << 3) /* first macro/text on line */
#define MDOC_SYNPRETTY (1 << 4) /* SYNOPSIS-style formatting */