From owner-freebsd-bugs Thu Jan 17 16:50:17 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 16B5737B404 for ; Thu, 17 Jan 2002 16:50:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0I0o3B30448; Thu, 17 Jan 2002 16:50:03 -0800 (PST) (envelope-from gnats) Date: Thu, 17 Jan 2002 16:50:03 -0800 (PST) Message-Id: <200201180050.g0I0o3B30448@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Alexey V. Neyman" Subject: Re: bin/26869: vi(1) crashes in viewing a file with long lines Reply-To: "Alexey V. Neyman" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/26869; it has been noted by GNATS. From: "Alexey V. Neyman" To: Sheldon Hearn Cc: bug-followup@freebsd.org Subject: Re: bin/26869: vi(1) crashes in viewing a file with long lines Date: Fri, 18 Jan 2002 03:41:41 +0300 Please try the following patch (I'll contact Keith Bostic later today). Index: vs_line.c =================================================================== RCS file: /usr/local/cvsroot/src/contrib/nvi/vi/vs_line.c,v retrieving revision 1.2 diff -u -r1.2 vs_line.c --- vs_line.c 2 Aug 1998 15:18:44 -0000 1.2 +++ vs_line.c 18 Jan 2002 00:17:07 -0000 @@ -317,6 +317,8 @@ * Don't fill anything in unless it's the right line and the right * character, and the right part of the character... */ + if (sp->cno >= len) + sp->cno = len - 1; if (yp == NULL || smp->lno != sp->lno || sp->cno < offset_in_line || offset_in_line + cols_per_screen < sp->cno) { _5(?h -- <-------------------------> ) May the Sun and Water ( Regards, Alexey V. Neyman ) always fall upon you! ( mailto:alex.neyman@auriga.ru <-------------------------> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message