From owner-freebsd-bugs Thu Jan 17 17:20:10 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 869EB37B416 for ; Thu, 17 Jan 2002 17:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0I1K1537410; Thu, 17 Jan 2002 17:20:01 -0800 (PST) (envelope-from gnats) Date: Thu, 17 Jan 2002 17:20:01 -0800 (PST) Message-Id: <200201180120.g0I1K1537410@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: bug-followup@freebsd.org Cc: Subject: Re: bin/26869: vi(1) crashes in viewing a file with long lines Date: Fri, 18 Jan 2002 04:16:48 +0300 Damn, sent to freebsd-bugs@ instead of bug-followup@. 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:49:03 -0000 @@ -324,8 +324,11 @@ /* If the line is on the screen, quit. */ if (is_cached) goto ret1; - } else + } else { + if (sp->cno >= len) + sp->cno = len - 1; cno_cnt = (sp->cno - offset_in_line) + 1; + } /* This is the loop that actually displays characters. */ ecbp = (cbp = cbuf) + sizeof(cbuf) - 1; -- <-------------------------> ) 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