update to 478

http://greenwoodsoftware.com/less/news.478.html
This commit is contained in:
Jozef Mlich 2015-06-24 10:26:21 +02:00
parent a24f11f952
commit 9c78a12749
4 changed files with 11 additions and 63 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/less-451.tar.gz
/less-458.tar.gz
/less-471.tar.gz
/less-478.tar.gz

View File

@ -1,56 +0,0 @@
diff -up ./less-471/charset.c.utf8 ./less-471/charset.c
--- ./less-471/charset.c.utf8 2014-12-14 19:19:11.000000000 +0100
+++ ./less-471/charset.c 2015-06-01 08:59:38.140122262 +0200
@@ -506,8 +506,9 @@ utf_len(ch)
* Does the parameter point to the lead byte of a well-formed UTF-8 character?
*/
public int
-is_utf8_well_formed(s)
+is_utf8_well_formed(s, slen)
unsigned char *s;
+ int slen;
{
int i;
int len;
@@ -516,6 +517,8 @@ is_utf8_well_formed(s)
return (0);
len = utf_len((char) s[0]);
+ if (len > slen)
+ return (0);
if (len == 1)
return (1);
if (len == 2)
@@ -547,7 +550,7 @@ utf_bin_count(data, len)
int bin_count = 0;
while (len > 0)
{
- if (is_utf8_well_formed(data))
+ if (is_utf8_well_formed(data, len))
{
int clen = utf_len(*data);
data += clen;
diff -up ./less-471/cmdbuf.c.utf8 ./less-471/cmdbuf.c
--- ./less-471/cmdbuf.c.utf8 2014-12-14 19:19:11.000000000 +0100
+++ ./less-471/cmdbuf.c 2015-06-01 09:00:43.247776312 +0200
@@ -1264,7 +1264,7 @@ cmd_char(c)
cmd_mbc_buf[cmd_mbc_buf_index++] = c;
if (cmd_mbc_buf_index < cmd_mbc_buf_len)
return (CC_OK);
- if (!is_utf8_well_formed(cmd_mbc_buf))
+ if (!is_utf8_well_formed(cmd_mbc_buf, cmd_mbc_buf_index))
{
/* complete, but not well formed (non-shortest form), sequence */
cmd_mbc_buf_len = 0;
diff -up ./less-471/line.c.utf8 ./less-471/line.c
--- ./less-471/line.c.utf8 2015-06-01 08:57:28.000000000 +0200
+++ ./less-471/line.c 2015-06-01 09:00:01.061352521 +0200
@@ -807,7 +807,7 @@ pappend(c, pos)
mbc_buf[mbc_buf_index++] = c;
if (mbc_buf_index < mbc_buf_len)
return (0);
- if (is_utf8_well_formed(mbc_buf))
+ if (is_utf8_well_formed(mbc_buf, mbc_buf_index))
r = do_append(get_wchar(mbc_buf), mbc_buf, mbc_pos);
else
/* Complete, but not shortest form, sequence. */

View File

@ -1,7 +1,7 @@
Summary: A text file browser similar to more, but better
Name: less
Version: 471
Release: 5%{?dist}
Version: 478
Release: 1%{?dist}
License: GPLv3+
Group: Applications/Text
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
@ -18,7 +18,6 @@ Patch8: less-458-lessecho-usage.patch
Patch9: less-458-less-filters-man.patch
Patch10: less-458-lesskey-usage.patch
Patch11: less-458-old-bot-in-help.patch
Patch12: less-471-out_of_bounds_read.patch
URL: http://www.greenwoodsoftware.com/less/
Requires: groff-base
BuildRequires: ncurses-devel
@ -46,11 +45,11 @@ files, and you'll use it frequently.
%patch9 -p1 -b .less-filters-man
%patch10 -p1 -b .lesskey-usage
%patch11 -p1 -b .old-bot
%patch12 -p2 -b .out_of_bounds_read.patch
autoreconf
chmod -R a+w *
chmod 644 *.c *.h LICENSE README
rm -f ./configure
autoreconf -fiv
%build
%configure
@ -77,6 +76,10 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d
rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Jun 24 2015 Jozef Mlich <jmlich@redhat.com> - 478-1
- update to 478
http://greenwoodsoftware.com/less/news.478.html
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 471-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

View File

@ -1 +1 @@
9a40d29a2d84b41f9f36d7dd90b4f950 less-471.tar.gz
934fcc9f137b9ef66a943c224f413d39 less-478.tar.gz