Import less v409, fixes a rather serious bug which causes
crashes when searching for invalid UTF-8 sequence.
This commit is contained in:
parent
1c6a5c10a3
commit
f78327b5b0
@ -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 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -1544,4 +1544,4 @@ LESS(1) LESS(1)
|
||||
|
||||
|
||||
|
||||
Version 408: 01 Oct 2007 LESS(1)
|
||||
Version 409: 12 Oct 2007 LESS(1)
|
||||
|
@ -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
|
||||
|
@ -46,4 +46,4 @@ LESSECHO(1) LESSECHO(1)
|
||||
|
||||
|
||||
|
||||
Version 408: 01 Oct 2007 LESSECHO(1)
|
||||
Version 409: 12 Oct 2007 LESSECHO(1)
|
||||
|
@ -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
|
||||
|
@ -357,4 +357,4 @@ LESSKEY(1) LESSKEY(1)
|
||||
|
||||
|
||||
|
||||
Version 408: 01 Oct 2007 LESSKEY(1)
|
||||
Version 409: 12 Oct 2007 LESSKEY(1)
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user