rpms/file/devel file-4.23-tryelf.patch, NONE, 1.1 file.spec, 1.67, 1.68

Tomas Smetana (tsmetana) fedora-extras-commits at redhat.com
Thu Jan 31 11:06:16 UTC 2008


Author: tsmetana

Update of /cvs/pkgs/rpms/file/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31960

Modified Files:
	file.spec 
Added Files:
	file-4.23-tryelf.patch 
Log Message:
* Thu Jan 31 2008 Tomas Smetana <tsmetana at redhat.com> - 4.23-2
- fix #430952 - wrong handling of ELF binaries


file-4.23-tryelf.patch:

--- NEW FILE file-4.23-tryelf.patch ---
diff -up file-4.23/src/readelf.c.tryelf file-4.23/src/readelf.c
--- file-4.23/src/readelf.c.tryelf	2008-01-31 08:05:27.000000000 +0100
+++ file-4.23/src/readelf.c	2008-01-31 08:04:07.000000000 +0100
@@ -983,7 +983,6 @@ file_tryelf(struct magic_set *ms, int fd
 			break;
 #endif
 		case ET_EXEC:
-		case ET_DYN:
 			if (dophn_exec(ms, class, swap,
 			    fd, (off_t)getu32(swap, elfhdr.e_phoff),
 			    getu16(swap, elfhdr.e_phnum), 
@@ -991,6 +990,8 @@ file_tryelf(struct magic_set *ms, int fd
 			    fsize, &flags, getu16(swap, elfhdr.e_shnum))
 				== -1)
 				return -1;
+		case ET_DYN:
+		default:
 			if (doshn(ms, class, swap, fd,
 			    (off_t)getu32(swap, elfhdr.e_shoff),
 			    getu16(swap, elfhdr.e_shnum),
@@ -998,9 +999,6 @@ file_tryelf(struct magic_set *ms, int fd
 			    &flags) == -1)
 				return -1;
 			break;
-
-		default:
-			break;
 		}
 		return 1;
 	}


Index: file.spec
===================================================================
RCS file: /cvs/pkgs/rpms/file/devel/file.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- file.spec	29 Jan 2008 08:07:33 -0000	1.67
+++ file.spec	31 Jan 2008 11:05:12 -0000	1.68
@@ -5,7 +5,7 @@
 Summary: A utility for determining file types
 Name: file
 Version: 4.23
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: BSD
 Group: Applications/File
 Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -24,6 +24,7 @@
 patch12: file-4.23-msoffice.patch
 patch13: file-4.21-efi.patch
 patch14: file-4.21-pybuild.patch
+patch15: file-4.23-tryelf.patch
 
 Requires: file-libs = %{version}-%{release}
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -82,6 +83,7 @@
 %patch12 -p1 -b .msoffice
 %patch13 -p1 -b .efi
 %patch14 -p1 -b .pybuild
+%patch15 -p1 -b .tryelf
 
 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
 touch -r doc/libmagic.man doc/libmagic.man_
@@ -154,6 +156,9 @@
 %endif
 
 %changelog
+* Thu Jan 31 2008 Tomas Smetana <tsmetana at redhat.com> - 4.23-2
+- fix #430952 - wrong handling of ELF binaries
+
 * Tue Jan 29 2008 Tomas Smetana <tsmetana at redhat.com> - 4.23-1
 - new upstream version; update patches; drop unused patches
 




More information about the fedora-extras-commits mailing list