summaryrefslogtreecommitdiffstats
path: root/contrib/less
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-10-12 19:03:03 +0000
committerdelphij <delphij@FreeBSD.org>2007-10-12 19:03:03 +0000
commitb3ebdff90d88ca9dd9bcdbdb45b44a3204e701d6 (patch)
tree46ad2cfb5524a6c8dded8d498f1a14c1a5b2bec7 /contrib/less
parent3c326e5bedcae5c44d75a7b4462a843d279f19e1 (diff)
parent9680b7d49a594123cfffb2bc9d11614d1a2625d0 (diff)
downloadFreeBSD-src-b3ebdff90d88ca9dd9bcdbdb45b44a3204e701d6.zip
FreeBSD-src-b3ebdff90d88ca9dd9bcdbdb45b44a3204e701d6.tar.gz
This commit was generated by cvs2svn to compensate for changes in r172597,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/less')
-rw-r--r--contrib/less/NEWS5
-rw-r--r--contrib/less/README4
-rw-r--r--contrib/less/charset.c12
-rw-r--r--contrib/less/less.man2
-rw-r--r--contrib/less/less.nro2
-rw-r--r--contrib/less/lessecho.man2
-rw-r--r--contrib/less/lessecho.nro2
-rw-r--r--contrib/less/lesskey.man2
-rw-r--r--contrib/less/lesskey.nro2
-rw-r--r--contrib/less/version.c3
10 files changed, 21 insertions, 15 deletions
diff --git a/contrib/less/NEWS b/contrib/less/NEWS
index f251a1e..0154225 100644
--- a/contrib/less/NEWS
+++ b/contrib/less/NEWS
@@ -13,7 +13,7 @@
======================================================================
- Major changes between "less" versions 406 and 408
+ Major changes between "less" versions 406 and 409
* Support CSI escape sequences, like SGR escape sequences.
@@ -23,6 +23,8 @@
* Fix configure bug on systems which don't support langinfo.h.
+* Fix crash when searching text containing certain invalid UTF-8 sequences.
+
======================================================================
Major changes between "less" versions 394 and 406
@@ -695,3 +697,4 @@
+
diff --git a/contrib/less/README b/contrib/less/README
index ace7bf0..73329d6 100644
--- a/contrib/less/README
+++ b/contrib/less/README
@@ -1,7 +1,7 @@
- Less, version 408
+ Less, version 409
- This is the distribution of less, version 408, released 01 Oct 2007.
+ This is the distribution of less, version 409, released 12 Oct 2007.
This program is part of the GNU project (http://www.gnu.org).
This program is free software. You may redistribute it and/or
diff --git a/contrib/less/charset.c b/contrib/less/charset.c
index 628218d..37d344d 100644
--- a/contrib/less/charset.c
+++ b/contrib/less/charset.c
@@ -668,6 +668,7 @@ step_char(pp, dir, limit)
char *limit;
{
LWCHAR ch;
+ int len;
char *p = *pp;
if (!utf_mode)
@@ -679,14 +680,15 @@ step_char(pp, dir, limit)
ch = (LWCHAR) ((p > limit) ? *--p : 0);
} else if (dir > 0)
{
- if (p + utf_len(*p) > limit)
+ len = utf_len(*p);
+ if (p + len > limit)
+ {
ch = 0;
- else
+ p = limit;
+ } else
{
ch = get_wchar(p);
- p++;
- while (IS_UTF8_TRAIL(*p))
- p++;
+ p += len;
}
} else
{
diff --git a/contrib/less/less.man b/contrib/less/less.man
index 217a321..773c7b9 100644
--- a/contrib/less/less.man
+++ b/contrib/less/less.man
@@ -1544,4 +1544,4 @@ LESS(1) LESS(1)
- Version 408: 01 Oct 2007 LESS(1)
+ Version 409: 12 Oct 2007 LESS(1)
diff --git a/contrib/less/less.nro b/contrib/less/less.nro
index 5399e83..483e194 100644
--- a/contrib/less/less.nro
+++ b/contrib/less/less.nro
@@ -1,4 +1,4 @@
-.TH LESS 1 "Version 408: 01 Oct 2007"
+.TH LESS 1 "Version 409: 12 Oct 2007"
.SH NAME
less \- opposite of more
.SH SYNOPSIS
diff --git a/contrib/less/lessecho.man b/contrib/less/lessecho.man
index 2bf8c9e..588f70a 100644
--- a/contrib/less/lessecho.man
+++ b/contrib/less/lessecho.man
@@ -46,4 +46,4 @@ LESSECHO(1) LESSECHO(1)
- Version 408: 01 Oct 2007 LESSECHO(1)
+ Version 409: 12 Oct 2007 LESSECHO(1)
diff --git a/contrib/less/lessecho.nro b/contrib/less/lessecho.nro
index 06c3936..d9dd628 100644
--- a/contrib/less/lessecho.nro
+++ b/contrib/less/lessecho.nro
@@ -1,4 +1,4 @@
-.TH LESSECHO 1 "Version 408: 01 Oct 2007"
+.TH LESSECHO 1 "Version 409: 12 Oct 2007"
.SH NAME
lessecho \- expand metacharacters
.SH SYNOPSIS
diff --git a/contrib/less/lesskey.man b/contrib/less/lesskey.man
index b4d4e2f..f951ea4 100644
--- a/contrib/less/lesskey.man
+++ b/contrib/less/lesskey.man
@@ -357,4 +357,4 @@ LESSKEY(1) LESSKEY(1)
- Version 408: 01 Oct 2007 LESSKEY(1)
+ Version 409: 12 Oct 2007 LESSKEY(1)
diff --git a/contrib/less/lesskey.nro b/contrib/less/lesskey.nro
index a49a1c0..afc3586 100644
--- a/contrib/less/lesskey.nro
+++ b/contrib/less/lesskey.nro
@@ -1,4 +1,4 @@
-.TH LESSKEY 1 "Version 408: 01 Oct 2007"
+.TH LESSKEY 1 "Version 409: 12 Oct 2007"
.SH NAME
lesskey \- specify key bindings for less
.SH SYNOPSIS
diff --git a/contrib/less/version.c b/contrib/less/version.c
index a4d7ea7..1fce12e 100644
--- a/contrib/less/version.c
+++ b/contrib/less/version.c
@@ -695,6 +695,7 @@ v405 6/17/07 Fix display bug when using -w option.
v406 6/17/07 Fix secure build.
v407 8/16/07 Fix bugs; support CSI chars.
v408 10/1/07 Fix bug in -i with non-ASCII chars.
+v409 10/12/07 Fix crash when viewing text with invalid UTF-8 sequences.
*/
-char version[] = "408";
+char version[] = "409";
OpenPOWER on IntegriCloud