diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-18 03:10:11 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-18 03:10:11 +0000 |
commit | bcb96064a93b17d1c9126fb86a01ede2ca704c61 (patch) | |
tree | ef09106e638f18d122b33be24689332198d549cd /mdoc.h | |
parent | 527dbfc8a6439fb7d7a2f2eb38f60e5d9142bf6c (diff) | |
download | mandoc-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.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 */ |