fix #1201630 - fix recursion in JPEG magic pattern
This commit is contained in:
parent
5de471469b
commit
801858b197
42
file-5.22-jpeg.patch
Normal file
42
file-5.22-jpeg.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 9f0601f3c03ffc561a2638c35eaf24308c7b3a72 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Fri, 2 Jan 2015 22:40:27 +0000
|
||||
Subject: [PATCH] Explain recursion better and avoid double recursion in the
|
||||
masked entries
|
||||
|
||||
---
|
||||
magic/Magdir/jpeg | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/magic/Magdir/jpeg b/magic/Magdir/jpeg
|
||||
index f32f58a..588073f 100644
|
||||
--- a/magic/Magdir/jpeg
|
||||
+++ b/magic/Magdir/jpeg
|
||||
@@ -41,7 +41,8 @@
|
||||
# This uses recursion...
|
||||
0 name jpeg_segment
|
||||
>0 beshort 0xFFFE
|
||||
->>(2.S+2) use jpeg_segment
|
||||
+# Recursion handled by FFE0
|
||||
+#>>(2.S+2) use jpeg_segment
|
||||
>>2 pstring/HJ x \b, comment: "%s"
|
||||
|
||||
>0 beshort 0xFFC0
|
||||
@@ -70,6 +71,7 @@
|
||||
>>(2.S+2) use jpeg_segment
|
||||
|
||||
>0 beshort 0xFFE1
|
||||
+# Recursion handled by FFE0
|
||||
#>>(2.S+2) use jpeg_segment
|
||||
>>4 string Exif \b, Exif Standard: [
|
||||
>>>10 indirect/r x
|
||||
@@ -85,7 +87,8 @@
|
||||
# D9: End of image
|
||||
# Dn: Restart
|
||||
>0 beshort&0xFFD0 =0xFFD0
|
||||
->>(2.S+2) use jpeg_segment
|
||||
+>>0 beshort&0xFFE0 !0xFFE0
|
||||
+>>>(2.S+2) use jpeg_segment
|
||||
|
||||
#>0 beshort x unknown 0x%x
|
||||
#>>(2.S+2) use jpeg_segment
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: A utility for determining file types
|
||||
Name: file
|
||||
Version: 5.22
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/File
|
||||
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
|
||||
@ -21,6 +21,7 @@ Patch8: file-5.14-perl.patch
|
||||
Patch14: file-5.19-cafebabe.patch
|
||||
Patch15: file-5.22-awk-perl.patch
|
||||
Patch16: file-5.22-zlib.patch
|
||||
Patch17: file-5.22-jpeg.patch
|
||||
URL: http://www.darwinsys.com/file/
|
||||
Requires: file-libs = %{version}-%{release}
|
||||
BuildRequires: zlib-devel
|
||||
@ -92,6 +93,7 @@ file(1) command.
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
|
||||
# Patches can generate *.orig files, which can't stay in the magic dir,
|
||||
# otherwise there will be problems with compiling magic file!
|
||||
@ -200,6 +202,9 @@ cd %{py3dir}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jun 22 2015 Jan Kaluza <jkaluza@redhat.com> - 5.22-5
|
||||
- fix #1201630 - fix recursion in JPEG magic pattern
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.22-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user