Update to new version 5.22

This commit is contained in:
Jan Kaluza 2015-02-10 07:34:32 +01:00
commit ed2b61f9e9
10 changed files with 21 additions and 156 deletions

2
.gitignore vendored
View File

@ -7,3 +7,5 @@ file-5.04.tar.gz
/file-5.11.tar.gz
/file-5.14.tar.gz
/file-5.19.tar.gz
/file-5.20.tar.gz
/file-5.22.tar.gz

View File

@ -2,14 +2,6 @@ diff --git a/magic/Magdir/python b/magic/Magdir/python
index d954ee6..52796ba 100644
--- a/magic/Magdir/python
+++ b/magic/Magdir/python
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: python,v 1.25 2014/05/06 16:08:32 christos Exp $
+# $File: python,v 1.22 2013/03/18 12:49:55 christos Exp $
# python: file(1) magic for python
#
# Outlook puts """ too for urgent messages
@@ -37,20 +37,24 @@
# from module.submodule import func1, func2
0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable

View File

@ -1,22 +1,22 @@
diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
index 3323593..0f28d7b 100644
index 939a092..5ce1453 100644
--- a/magic/Magdir/filesystems
+++ b/magic/Magdir/filesystems
@@ -62,7 +62,7 @@
@@ -254,7 +254,7 @@
30 search/481 \x55\xAA
# to display DOS/MBR boot sector (40) before old one (strength=50+21),Syslinux bootloader (71),SYSLINUX MBR (37+36),NetBSD mbr (110),AdvanceMAME mbr (111)
# DOS BPB information (70) and after DOS floppy (120) like in previous file version
-!:strength +72
-!:strength +65
+!:strength +0
# for sector sizes < 512 Bytes
>11 uleshort <512
>>(11.s-2) uleshort 0xAA55 DOS/MBR boot sector
@@ -1176,7 +1176,7 @@
>11 uleshort&0xf001f 0
>>11 uleshort <32769
>>>11 uleshort >31
->>>>21 ubyte&0xf0 0xF0
+>>>>21 ubyte&0xf0 0xF0 x86 boot sector
>>>>>0 ubyte 0xEB
>>>>>>1 ubyte x \b, code offset 0x%x+2
>>>>>0 ubyte 0xE9
@@ -266,7 +266,7 @@
0x1FE leshort 0xAA55 DOS/MBR boot sector
#
# to display information (50) before DOS BPB (strength=70) and after DOS floppy (120) like in old file version
-!:strength +65
+!:strength +0
>2 string OSBS OS/BS MBR
# added by Joerg Jenderek at Feb 2013 according to http://thestarman.pcministry.com/asm/mbr/
# and http://en.wikipedia.org/wiki/Master_Boot_Record

View File

@ -1,36 +0,0 @@
From 0641e56be1af003aa02c7c6b0184466540637233 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Thu, 7 Aug 2014 09:38:35 +0000
Subject: [PATCH] Prevent wrap around (Remi Collet at redhat)
---
src/cdf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/cdf.c b/src/cdf.c
index 5dbf3b1..3e691f4 100644
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.63 2014/06/09 13:04:37 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.64 2014/07/24 19:35:39 christos Exp $")
#endif
#include <assert.h>
@@ -835,6 +835,10 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
q = (const uint8_t *)(const void *)
((const char *)(const void *)p + ofs
- 2 * sizeof(uint32_t));
+ if (q < p) {
+ DPRINTF(("Wrapped around %p < %p\n", q, p));
+ goto out;
+ }
if (q > e) {
DPRINTF(("Ran of the end %p > %p\n", q, e));
goto out;
--
2.0.4

View File

@ -1,11 +0,0 @@
diff --git a/magic/Magdir/linux b/magic/Magdir/linux
index e099cd3..2af3005 100644
--- a/magic/Magdir/linux
+++ b/magic/Magdir/linux
@@ -413,3 +413,6 @@
>>>>20 belong >16
>>>>>36 belong x \b, DT structure block size=%d
+# glibc locale archive as defined in glibc locale/locarchive.h
+0 lelong 0xde020109 locale archive
+>24 lelong x %d strings

View File

@ -1,22 +0,0 @@
From bf3fea9e6c0b18e9a645d2a796a1e3ae29be5ee5 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Tue, 5 Aug 2014 07:38:45 +0000
Subject: [PATCH] PR/360: Andreas Koehler: Escape regex properly.
---
magic/Magdir/msooxml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/magic/Magdir/msooxml b/magic/Magdir/msooxml
index c908b71..80bdf13 100644
--- a/magic/Magdir/msooxml
+++ b/magic/Magdir/msooxml
@@ -16,7 +16,7 @@
0 string PK\003\004
!:strength +10
# make sure the first file is correct
->0x1E regex \[Content_Types\]\.xml|_rels/\.rels
+>0x1E regex \\[Content_Types\\]\\.xml|_rels/\\.rels
# skip to the second local file header
# since some documents include a 520-byte extra field following the file
# header, we need to scan for the next header

View File

@ -1,29 +0,0 @@
From d9e9aa9f06757947a1e51f80925445b2f18a6fc3 Mon Sep 17 00:00:00 2001
From: Reuben Thomas <rrt@sc3d.org>
Date: Mon, 14 Jul 2014 14:21:33 +0000
Subject: [PATCH] Comment out too-sensitive Pascal magic
---
magic/Magdir/pascal | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/magic/Magdir/pascal b/magic/Magdir/pascal
index a95939c..d8e61c6 100644
--- a/magic/Magdir/pascal
+++ b/magic/Magdir/pascal
@@ -1,10 +1,10 @@
#------------------------------------------------------------------------------
-# $File: pascal,v 1.1 2011/12/08 12:12:46 rrt Exp $
+# $File: pascal,v 1.1 2011/12/08 12:12:46 rrt Exp $
# pascal: file(1) magic for Pascal source
#
0 search/8192 (input, Pascal source text
!:mime text/x-pascal
-0 regex \^program Pascal source text
-!:mime text/x-pascal
-0 regex \^record Pascal source text
-!:mime text/x-pascal
+#0 regex \^program Pascal source text
+#!:mime text/x-pascal
+#0 regex \^record Pascal source text
+#!:mime text/x-pascal

View File

@ -1,24 +0,0 @@
From 8f462b16513c6961a938d0eb443bc538574eeeca Mon Sep 17 00:00:00 2001
From: Benedikt Morbach <bmorbach@redhat.com>
Date: Wed, 30 Jul 2014 18:53:58 +0200
Subject: [PATCH] add support for python 3.4 byte-compiled files
---
magic/Magdir/python | 1 +
1 file changed, 1 insertion(+)
diff --git a/magic/Magdir/python b/magic/Magdir/python
index d5e2964..19d4b55 100644
--- a/magic/Magdir/python
+++ b/magic/Magdir/python
@@ -23,6 +23,7 @@
0 belong 0x4f0c0d0a python 3.1 byte-compiled
0 belong 0x6c0c0d0a python 3.2 byte-compiled
0 belong 0x9e0c0d0a python 3.3 byte-compiled
+0 belong 0xee0c0d0a python 3.4 byte-compiled
0 search/1/w #!\ /usr/bin/python Python script text executable
!:mime text/x-python
--
1.9.3

View File

@ -3,8 +3,8 @@
Summary: A utility for determining file types
Name: file
Version: 5.19
Release: 7%{?dist}
Version: 5.22
Release: 1%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@ -18,13 +18,8 @@ Patch5: file-5.04-man-return-code.patch
Patch6: file-5.04-generic-msdos.patch
Patch7: file-5.14-x86boot.patch
Patch8: file-5.14-perl.patch
Patch9: file-5.19-CVE-2014-3587.patch
Patch10: file-5.19-pascal.patch
Patch11: file-5.19-locale-archive.patch
Patch12: file-5.19-msooxml.patch
Patch13: file-5.19-python-3.4.patch
Patch14: file-5.19-cafebabe.patch
Patch15: file-5.20-CVE-2014-3710.patch
Patch15: file-5.22-awk-perl.patch
URL: http://www.darwinsys.com/file/
Requires: file-libs = %{version}-%{release}
BuildRequires: zlib-devel
@ -93,11 +88,6 @@ file(1) command.
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
@ -208,6 +198,9 @@ cd %{py3dir}
%endif
%changelog
* Wed Feb 04 2015 Jan Kaluza <jkaluza@redhat.com> - 5.22-1
- update to new version 5.22
* Thu Oct 23 2014 Jan Kaluza <jkaluza@redhat.com> - 5.19-7
- fix #1155464 - fix for CVE-2014-3710

View File

@ -1 +1 @@
e3526f59023f3f7d1ffa4d541335edab file-5.19.tar.gz
8fb13e5259fe447e02c4a37bc7225add file-5.22.tar.gz