From f6c44d31238af86efa12150be15d92373bfbac59 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 6 Dec 2010 13:25:25 +0000 Subject: 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. --- term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'term.c') 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 * Copyright (c) 2010 Ingo Schwarze @@ -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; -- cgit v1.2.3-56-ge451