diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-10-27 19:27:31 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-10-27 19:27:31 +0000 |
commit | c1fb11624ae468a26e80274bf22399b4fd1ee6c8 (patch) | |
tree | 80481a9cfa9f8cdbd04a2d386f54ff2717d5a5d8 /usr.bin/mandoc | |
parent | 18191ac069de4d6f4a8bc87c76496d8d3a2dd556 (diff) |
Fix an off-by-one in an assertion, crashing the renderer on ".Os \&".
This bug was a living fossil, introduced on Feb 21, 2009.
Reported by joachimschipper dot nl, thanks.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/term.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c index 48a585d3149..8ecc5e5c774 100644 --- a/usr.bin/mandoc/term.c +++ b/usr.bin/mandoc/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.53 2010/10/02 15:11:54 schwarze Exp $ */ +/* $Id: term.c,v 1.54 2010/10/27 19:27:30 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -142,7 +142,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; |