From 14be1f050f9c4f779e75454ecedfad4b1386ce0a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 2 Sep 2020 16:40:36 +0000 Subject: Do not indent by SIZE_MAX/2 when .ce occurs inside explicit no-fill mode. While here, drop two unused arguments from the function term_field(); the related work was already done by term_fill() before this commit. I found the bug in an afl run that was performed by Jan Schreiber . --- regress/roff/ce/basic.in | 14 ++++++++++++-- regress/roff/ce/basic.out_ascii | 10 ++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'regress') diff --git a/regress/roff/ce/basic.in b/regress/roff/ce/basic.in index 9930d56b..e2bd88b9 100644 --- a/regress/roff/ce/basic.in +++ b/regress/roff/ce/basic.in @@ -1,5 +1,5 @@ -.\" $OpenBSD: basic.in,v 1.1 2019/01/04 01:06:44 schwarze Exp $ -.TH CE-BASIC 1 "January 4, 2019" +.\" $OpenBSD: basic.in,v 1.2 2020/09/02 16:36:48 schwarze Exp $ +.TH CE-BASIC 1 "September 2, 2020" .SH NAME ce-basic \- basic usage of the centering request .SH DESCRIPTION @@ -13,5 +13,15 @@ text .rj 2 Text adjusted to the right margin works in just the same way and isn't filled either. +.PP +.nf +Now entering +explicit no-fill mode. +.ce 2 +Text is still +not filled. +.PP +.fi final text +in fill mode diff --git a/regress/roff/ce/basic.out_ascii b/regress/roff/ce/basic.out_ascii index 709e1e96..fe292e71 100644 --- a/regress/roff/ce/basic.out_ascii +++ b/regress/roff/ce/basic.out_ascii @@ -12,8 +12,14 @@ DDEESSCCRRIIPPTTIIOONN normal text Text adjusted to the right margin works in just the same way and isn't filled either. - final text + Now entering + explicit no-fill mode. + Text is still + not filled. + final text in fill mode -OpenBSD January 4, 2019 CE-BASIC(1) + + +OpenBSD September 2, 2020 CE-BASIC(1) -- cgit v1.2.3-56-ge451