aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-06 13:25:25 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-06 13:25:25 +0000
commitf6c44d31238af86efa12150be15d92373bfbac59 (patch)
treedcaa65f7d5acb3bfdb121bdc81c5a2437ba4a80c /term.c
parent8b3150eb7ea715f96295991892f92da415734e01 (diff)
downloadmandoc-f6c44d31238af86efa12150be15d92373bfbac59.tar.gz
mandoc-f6c44d31238af86efa12150be15d92373bfbac59.tar.zst
mandoc-f6c44d31238af86efa12150be15d92373bfbac59.zip
Track down a bug of empty `de XX' macros causing uncertain behaviour by
returning empty strings in roff_getstrn() instead of NULL. This caused maddeningly irregular segfaults in the pod2man preamble for `de IX'. But only on DEC alpha. Also integrate the kinda-probably-safe assertion relaxation in term.c, field-tested by schwarze@. This allows ALL [unpreprocessed] base and xenocara manuals for all BSD systems to run without segfault.
Diffstat (limited to 'term.c')
-rw-r--r--term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/term.c b/term.c
index 37fc180d..d402968e 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.174 2010/10/02 15:15:55 schwarze Exp $ */
+/* $Id: term.c,v 1.175 2010/12/06 13:25:25 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -146,7 +146,7 @@ term_flushln(struct termp *p)
* an indentation, but can be, for tagged lists or columns, a
* small set of values.
*/
- assert (p->rmargin > p->offset);
+ assert (p->rmargin >= p->offset);
dv = p->rmargin - p->offset;
maxvis = (int)dv > p->overstep ? dv - (size_t)p->overstep : 0;
dv = p->maxrmargin - p->offset;