Date: Thu, 17 Jan 2002 17:20:01 -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: <200201180120.g0I1K1537410@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: 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201180120.g0I1K1537410>
