Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2002 16:50:03 -0800 (PST)
From:      "Alexey V. Neyman" <alex.neyman@auriga.ru>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/26869: vi(1) crashes in viewing a file with long lines
Message-ID:  <200201180050.g0I0o3B30448@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/26869; it has been noted by GNATS.

From: "Alexey V. Neyman" <alex.neyman@auriga.ru>
To: Sheldon Hearn <sheldonh@starjuice.net>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201180050.g0I0o3B30448>