rpms/file/F-13 file-5.04-core-trim.patch, NONE, 1.1 file.spec, 1.118, 1.119
Daniel Novotny
dnovotny at fedoraproject.org
Thu May 27 13:22:56 UTC 2010
Author: dnovotny
Update of /cvs/extras/rpms/file/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv580
Modified Files:
file.spec
Added Files:
file-5.04-core-trim.patch
Log Message:
fix #566305
file-5.04-core-trim.patch:
readelf.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--- NEW FILE file-5.04-core-trim.patch ---
--- file-4.26.OLD/src/readelf.c 2008-07-26 17:03:55.000000000 +0200
+++ file-4.26/src/readelf.c 2008-12-03 17:16:57.000000000 +0100
@@ -738,6 +738,25 @@ core:
/*
* Well, that worked.
*/
+
+ /*
+ * Try next offsets, in case this match is
+ * in the middle of a string.
+ */
+ size_t k;
+ for (k = i + 1 ; k < NOFFSETS ; k++) {
+ if (prpsoffsets(k) >= prpsoffsets(i))
+ continue;
+ size_t no;
+ int adjust = 1;
+ for (no = doff + prpsoffsets(k);
+ no < doff + prpsoffsets(i); no++)
+ adjust = adjust
+ && isprint(nbuf[no]);
+ if (adjust)
+ i = k;
+ }
+
cname = (unsigned char *)
&nbuf[doff + prpsoffsets(i)];
for (cp = cname; *cp && isprint(*cp); cp++)
Index: file.spec
===================================================================
RCS file: /cvs/extras/rpms/file/F-13/file.spec,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -p -r1.118 -r1.119
--- file.spec 9 Feb 2010 15:28:56 -0000 1.118
+++ file.spec 27 May 2010 13:22:56 -0000 1.119
@@ -5,7 +5,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.04
-Release: 3%{?dist}
+Release: 4%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -15,6 +15,7 @@ Patch1: file-5.00-devdrv.patch
Patch2: file-5.00-mdmp.patch
Patch3: file-5.04-ulaw-segfault.patch
Patch4: file-5.04-ruby-modules.patch
+Patch5: file-5.04-core-trim.patch
Requires: file-libs = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -76,6 +77,8 @@ file(1) command.
%patch3 -p1
#fixes #562840
%patch4 -p1
+#fixes #566305
+%patch5 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@@ -152,6 +155,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Thu May 27 2010 Daniel Novotny <dnovotny at redhat.com> 5.04-4
+- fix #566305 - "file" may trim too much of command line from core file
+
* Tue Feb 09 2010 Daniel Novotny <dnovotny at redhat.com> 5.04-3
- fix #562840 - [PATCH] Add matches for ruby modules
More information about the scm-commits
mailing list