rpms/less/F-8 less-406-nonexfile.patch, NONE, 1.1 less.spec, 1.42, 1.43
Zdenek Prikryl (zprikryl)
fedora-extras-commits at redhat.com
Wed Dec 19 09:38:16 UTC 2007
- Previous message (by thread): rpms/kernel/devel Makefile, 1.63, 1.64 gen-patches, 1.2, 1.3 kernel.spec, 1.324, 1.325
- Next message (by thread): rpms/yaboot/F-8 efika.forth, NONE, 1.1 yaboot-1.3.13-bplan.patch, NONE, 1.1 yaboot.spec, 1.41, 1.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: zprikryl
Update of /cvs/extras/rpms/less/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2664
Modified Files:
less.spec
Added Files:
less-406-nonexfile.patch
Log Message:
Fixed sigsegv when displaying non-existing file after short file
Resolves: #426107
less-406-nonexfile.patch:
--- NEW FILE less-406-nonexfile.patch ---
--- less-406/ch.c.nonexfile 2007-06-17 18:56:04.000000000 +0200
+++ less-406/ch.c 2007-12-19 10:27:54.000000000 +0100
@@ -128,6 +128,9 @@ fch_get()
POSITION pos;
POSITION len;
+ if (thisfile == NULL)
+ return (EOI);
+
slept = FALSE;
/*
@@ -416,6 +419,9 @@ ch_seek(pos)
BLOCKNUM new_block;
POSITION len;
+ if (thisfile == NULL)
+ return (0);
+
len = ch_length();
if (pos < ch_zero() || (len != NULL_POSITION && pos > len))
return (1);
@@ -450,6 +456,9 @@ ch_end_seek()
{
POSITION len;
+ if (thisfile == NULL)
+ return (0);
+
if (ch_flags & CH_CANSEEK)
ch_fsize = filesize(ch_file);
@@ -503,6 +512,8 @@ ch_beg_seek()
public POSITION
ch_length()
{
+ if (thisfile == NULL)
+ return (NULL_POSITION);
if (ignore_eoi)
return (NULL_POSITION);
if (ch_flags & CH_HELPFILE)
@@ -516,6 +527,8 @@ ch_length()
public POSITION
ch_tell()
{
+ if (thisfile == NULL)
+ return (NULL_POSITION);
return (ch_block * LBUFSIZE) + ch_offset;
}
@@ -527,6 +540,8 @@ ch_forw_get()
{
register int c;
+ if (thisfile == NULL)
+ return (EOI);
c = ch_get();
if (c == EOI)
return (EOI);
@@ -546,6 +561,8 @@ ch_forw_get()
public int
ch_back_get()
{
+ if (thisfile == NULL)
+ return (EOI);
if (ch_offset > 0)
ch_offset --;
else
@@ -586,6 +603,9 @@ ch_flush()
{
register struct buf *bp;
+ if (thisfile == NULL)
+ return;
+
if (!(ch_flags & CH_CANSEEK))
{
/*
@@ -769,6 +789,9 @@ ch_close()
{
int keepstate = FALSE;
+ if (thisfile == NULL)
+ return;
+
if (ch_flags & (CH_CANSEEK|CH_POPENED|CH_HELPFILE))
{
/*
@@ -807,6 +830,8 @@ ch_close()
public int
ch_getflags()
{
+ if (thisfile == NULL)
+ return (0);
return (ch_flags);
}
Index: less.spec
===================================================================
RCS file: /cvs/extras/rpms/less/F-8/less.spec,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- less.spec 1 Oct 2007 09:23:12 -0000 1.42
+++ less.spec 19 Dec 2007 09:37:36 -0000 1.43
@@ -1,7 +1,7 @@
Summary: A text file browser similar to more, but better
Name: less
Version: 406
-Release: 12%{?dist}
+Release: 13%{?dist}
License: BSD
Group: Applications/Text
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
@@ -12,6 +12,7 @@
Patch1: less-406-Foption.patch
Patch3: less-394-goend.patch
Patch4: less-394-time.patch
+Patch5: less-406-nonexfile.patch
URL: http://www.greenwoodsoftware.com/less/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -35,6 +36,7 @@
%patch1 -p1 -b .Foption
%patch3 -p1 -b .goend
%patch4 -p1 -b .time
+%patch5 -p1 -b .nonexfile
chmod -R a+w *
chmod 644 lessecho.c lesskey.c version.c LICENSE
@@ -63,6 +65,10 @@
rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Dec 19 2007 Zdenek Prikryl <iprikryl at redhat.com> - 406-13
+- Fixed sigsegv when displaying non-existing file after short file
+- Resolves: #426107
+
* Mon Oct 1 2007 Ivana Varekova <varekova at redhat.com> - 406-12
- change license tag
- fix 312591 - add which dependency
- Previous message (by thread): rpms/kernel/devel Makefile, 1.63, 1.64 gen-patches, 1.2, 1.3 kernel.spec, 1.324, 1.325
- Next message (by thread): rpms/yaboot/F-8 efika.forth, NONE, 1.1 yaboot-1.3.13-bplan.patch, NONE, 1.1 yaboot.spec, 1.41, 1.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list