eventually leading to NULL pointer access;
found by jsg@ with afl, text case #455.
-/* $Id: mdoc_macro.c,v 1.181 2015/02/10 17:47:45 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.182 2015/02/11 13:37:57 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
+ /* Explicit blocks close out description lines. */
+
+ if (n->tok == MDOC_Nd) {
+ rew_last(mdoc, n);
+ continue;
+ }
+
/*
* When finding an open sub block, remember the last
* open explicit block, or, in case there are only
/*
* When finding an open sub block, remember the last
* open explicit block, or, in case there are only