Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2]: src/usr.bin/less/less Pull up following revision(s) (requeste...



details:   https://anonhg.NetBSD.org/src/rev/1f653205e0f1
branches:  netbsd-2
changeset: 564005:1f653205e0f1
user:      riz <riz%NetBSD.org@localhost>
date:      Wed Aug 24 18:56:56 2005 +0000

description:
Pull up following revision(s) (requested by tron in ticket #5612):
        usr.bin/less/less/line.c: revision 1.10
Fix a one byte off error which causes "less" to crash if you view a
large file, jump to the end, scroll backwards with "b" and try to
search backwards afterwards.

diffstat:

 usr.bin/less/less/line.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 82a6b46f42af -r 1f653205e0f1 usr.bin/less/less/line.c
--- a/usr.bin/less/less/line.c  Wed Aug 24 04:13:59 2005 +0000
+++ b/usr.bin/less/less/line.c  Wed Aug 24 18:56:56 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: line.c,v 1.8 2003/04/14 02:56:47 mrg Exp $     */
+/*     $NetBSD: line.c,v 1.8.4.1 2005/08/24 18:56:56 riz Exp $ */
 
 /*
  * Copyright (C) 1984-2002  Mark Nudelman
@@ -918,8 +918,8 @@
                        /*
                         * Shift the data to the end of the new linebuf.
                         */
-                       for (fm = linebuf + old_size_linebuf,
-                             to = linebuf + size_linebuf;
+                       for (fm = linebuf + old_size_linebuf - 1,
+                             to = linebuf + size_linebuf - 1;
                             fm >= linebuf;  fm--, to--)
                                *to = *fm;
                        n = size_linebuf - old_size_linebuf;



Home | Main Index | Thread Index | Old Index