From b173abb353f0f43b913f9e22872f7a810ced2771b08c226da10dea6d67fd5e22 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 28 Mar 2014 10:32:53 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=95 --- ...ut-of-bounds-calculations-Jan-Kaluza.patch | 25 ------------------- file-5.15-clear-invalid.patch | 4 +-- file-5.17.tar.gz | 3 --- file-5.07-elf.dif => file-5.18-elf.dif | 8 +++--- ....12-endian.patch => file-5.18-endian.patch | 18 ++++++------- ...2-javacheck.dif => file-5.18-javacheck.dif | 4 +-- file-5.18.tar.gz | 3 +++ file.changes | 25 +++++++++++++++++++ file.spec | 11 +++----- python-magic.spec | 2 +- 10 files changed, 50 insertions(+), 53 deletions(-) delete mode 100644 0001-off-by-one-in-out-of-bounds-calculations-Jan-Kaluza.patch delete mode 100644 file-5.17.tar.gz rename file-5.07-elf.dif => file-5.18-elf.dif (73%) rename file-5.12-endian.patch => file-5.18-endian.patch (86%) rename file-5.12-javacheck.dif => file-5.18-javacheck.dif (82%) create mode 100644 file-5.18.tar.gz diff --git a/0001-off-by-one-in-out-of-bounds-calculations-Jan-Kaluza.patch b/0001-off-by-one-in-out-of-bounds-calculations-Jan-Kaluza.patch deleted file mode 100644 index a1c3724..0000000 --- a/0001-off-by-one-in-out-of-bounds-calculations-Jan-Kaluza.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 70c65d2e1841491f59168db1f905e8b14083fb1c Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Tue, 4 Mar 2014 17:42:19 +0000 -Subject: [PATCH] off by one in out of bounds calculations (Jan Kaluza) - ---- - src/softmagic.c | 4 +- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git src/softmagic.c src/softmagic.c -index 170de95..5ed3998 100644 ---- src/softmagic.c -+++ src/softmagic.c -@@ -72,7 +72,7 @@ private void cvt_16(union VALUETYPE *, const struct magic *); - private void cvt_32(union VALUETYPE *, const struct magic *); - private void cvt_64(union VALUETYPE *, const struct magic *); - --#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) >= ((n) - (o))) -+#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o))) - /* - * softmagic - lookup one file in parsed, in-memory copy of database - * Passed the name and FILE * of one file to be typed. --- -1.7.9.2 - diff --git a/file-5.15-clear-invalid.patch b/file-5.15-clear-invalid.patch index 95e71ec..0eeaf52 100644 --- a/file-5.15-clear-invalid.patch +++ b/file-5.15-clear-invalid.patch @@ -21,5 +21,5 @@ Index: file-5.15/magic/Magdir/elf >16 leshort &0xff00 processor-specific, ->18 clear x >18 leshort 0 no machine, - >18 leshort 1 AT&T WE32100 - >18 leshort 2 SPARC + >18 leshort 1 AT&T WE32100, + >18 leshort 2 SPARC, diff --git a/file-5.17.tar.gz b/file-5.17.tar.gz deleted file mode 100644 index 1feaf08..0000000 --- a/file-5.17.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3feb97141b387b64da30aee485852925312c0e74219380a5ed451f14a90c83ca -size 709991 diff --git a/file-5.07-elf.dif b/file-5.18-elf.dif similarity index 73% rename from file-5.07-elf.dif rename to file-5.18-elf.dif index bbf08d3..ed2d9e4 100644 --- a/file-5.07-elf.dif +++ b/file-5.18-elf.dif @@ -1,15 +1,15 @@ --- src/readelf.c -+++ src/readelf.c 2013-09-30 13:41:16.000000000 +0000 -@@ -708,7 +708,7 @@ core: ++++ src/readelf.c 2014-03-28 10:12:22.094878811 +0000 +@@ -737,7 +737,7 @@ core: + default: if (xnh_type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) { - /*###709 [cc] warning: declaration of 'i' shadows previous non-variable%%%*/ - size_t i, j; + size_t i, j, m = 0; unsigned char c; /* * Extract the program name. We assume -@@ -720,7 +720,9 @@ core: +@@ -749,7 +749,9 @@ core: * If the characters aren't all printable, * reject it. */ diff --git a/file-5.12-endian.patch b/file-5.18-endian.patch similarity index 86% rename from file-5.12-endian.patch rename to file-5.18-endian.patch index 93a1252..6431b92 100644 --- a/file-5.12-endian.patch +++ b/file-5.18-endian.patch @@ -1,14 +1,14 @@ --- src/apprentice.c -+++ src/apprentice.c 2013-09-30 00:00:00.000000000 +0000 -@@ -48,6 +48,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1. - #include ++++ src/apprentice.c 2014-03-28 10:17:46.310235050 +0000 +@@ -54,6 +54,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1. + #if defined(HAVE_LIMITS_H) + #include #endif - #include +#include - #define EATAB {while (isascii((unsigned char) *l) && \ - isspace((unsigned char) *l)) ++l;} -@@ -115,9 +116,11 @@ private struct mlist *mlist_alloc(void); + #ifndef SSIZE_MAX + #define MAXMAGIC_SIZE ((ssize_t)0x7fffffff) +@@ -127,9 +128,11 @@ private struct mlist *mlist_alloc(void); private void mlist_free(struct mlist *); private void byteswap(struct magic *, uint32_t); private void bs1(struct magic *); @@ -23,7 +23,7 @@ private char *mkdbname(struct magic_set *, const char *, int); private struct magic_map *apprentice_map(struct magic_set *, const char *); private void apprentice_unmap(struct magic_map *); -@@ -2809,67 +2812,6 @@ byteswap(struct magic *magic, uint32_t n +@@ -2882,67 +2885,6 @@ byteswap(struct magic *magic, uint32_t n } /* @@ -93,7 +93,7 @@ private void --- src/cdf.c +++ src/cdf.c 2013-09-30 00:00:00.000000000 +0000 -@@ -50,6 +50,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.53 2013 +@@ -50,6 +50,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.55 2014 #ifdef HAVE_LIMITS_H #include #endif diff --git a/file-5.12-javacheck.dif b/file-5.18-javacheck.dif similarity index 82% rename from file-5.12-javacheck.dif rename to file-5.18-javacheck.dif index 088d771..196d117 100644 --- a/file-5.12-javacheck.dif +++ b/file-5.18-javacheck.dif @@ -1,11 +1,11 @@ --- magic/Magdir/cafebabe -+++ magic/Magdir/cafebabe 2013-09-30 00:00:00.000000000 +0000 ++++ magic/Magdir/cafebabe 2014-03-28 10:15:13.354235294 +0000 @@ -15,7 +15,7 @@ # might add another one or two as time goes by... # ### JAVA START ### -0 belong 0xcafebabe +0 belong 0xcafebabe Cafe Babe - !:mime application/x-java-applet >4 belong >30 compiled Java class data, + !:mime application/x-java-applet >>6 beshort x version %d. diff --git a/file-5.18.tar.gz b/file-5.18.tar.gz new file mode 100644 index 0000000..4c088d7 --- /dev/null +++ b/file-5.18.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6519fb706d583231c2419592ebecdbb21d33c62eaf7a1a0b24ddfcb80c08bf07 +size 715461 diff --git a/file.changes b/file.changes index 8e2518a..68b3d21 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Fri Mar 28 10:24:18 UTC 2014 - werner@suse.de + +- Update to file version 5.18 + * add fmtcheck(3) for those who don't have it + * prevent mime entries from being attached to magic + entries with no descriptions + * adjust magic strength for regex type + * remove superfluous ascmagic with encoding test + * fix regression fix echo -ne "\012\013\014" | file -i - + which printed "binary" instead of "application/octet-stream" + * add size_t overflow check for magic file size + * experimental support for matching with CFD CLSID + * Cache old LC_CTYPE locale before setting it to "C", so + we can use it to restore LC_CTYPE instead of asking + setlocale() to scan the environment variables. +- Refresh patches + file-5.07-elf.dif becomes file-5.18-elf.dif + file-5.12-javacheck.dif becomes file-5.18-javacheck.dif + file-5.12-endian.patch becomes file-5.18-endian.patch + file-5.15-clear-invalid.patch +- Drop patch + 0001-off-by-one-in-out-of-bounds-calculations-Jan-Kaluza.patch + now part of upstream + ------------------------------------------------------------------- Mon Mar 17 14:04:24 UTC 2014 - werner@suse.de diff --git a/file.spec b/file.spec index be59d6e..cfc789c 100644 --- a/file.spec +++ b/file.spec @@ -30,7 +30,7 @@ Obsoletes: file-64bit %endif # # Set Version also in python-magic.spec -Version: 5.17 +Version: 5.18 Release: 0 Summary: A Tool to Determine File Types License: BSD-2-Clause @@ -43,7 +43,7 @@ Patch4: file-4.24-autoconf.dif Patch5: file-5.14-tex.dif Patch7: file-4.20-ssd.dif Patch8: file-4.20-xen.dif -Patch9: file-5.07-elf.dif +Patch9: file-5.18-elf.dif Patch10: file-5.14-printf.dif Patch11: file-5.12-zip.dif Patch12: file-5.17-option.dif @@ -51,18 +51,16 @@ Patch13: file-4.21-scribus.dif Patch15: file-4.21-xcursor.dif Patch20: file-4.24-mips.dif Patch22: file-4.24-cromfs.dif -Patch25: file-5.12-javacheck.dif +Patch25: file-5.18-javacheck.dif Patch26: file-4.24-solv.dif Patch27: file-5.12-zip2.0.dif Patch28: file-5.07-iso9660.dif Patch31: file-5.07-biorad.dif Patch32: file-5.07-clicfs.dif Patch33: file-5.16-ocloexec.patch -Patch34: file-5.12-endian.patch +Patch34: file-5.18-endian.patch Patch35: file-5.12-nitpick.dif Patch36: file-5.15-clear-invalid.patch -# PATCH-FIX-USTREAM last patch for bnc#866750 - CVE-2014-2270: file: crash when parsing some PE executables -Patch37: 0001-off-by-one-in-out-of-bounds-calculations-Jan-Kaluza.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir /etc %global _miscdir %{_datadir}/misc @@ -128,7 +126,6 @@ to develop applications that require the magic "file" interface. %patch34 -p0 -b .endian %patch35 -p0 -b .nitpick %patch36 -p1 -b .clear -%patch37 -p0 -b .CVE-2014-2270 %patch -b .0 test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in diff --git a/python-magic.spec b/python-magic.spec index 217feb4..9e298a3 100644 --- a/python-magic.spec +++ b/python-magic.spec @@ -23,7 +23,7 @@ BuildRequires: libtool BuildRequires: python-devel BuildRequires: zlib-devel Url: http://www.darwinsys.com/file/ -Version: 5.17 +Version: 5.18 Release: 0 Summary: Python module to use libmagic License: BSD-3-Clause and BSD-4-Clause