diff options
Diffstat (limited to 'sys-apps/file/files')
-rw-r--r-- | sys-apps/file/files/file-5.26-compress-1.patch | 53 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.26-compress-2.patch | 73 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.26-header-define.patch | 26 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.26-msoffice-magic.patch | 45 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.26-nes-magic.patch | 27 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.26-php-magic.patch | 28 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.26-stdin-rpm.patch | 27 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.26-stdin-test.patch | 132 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.26-tests-fatal.patch | 27 |
9 files changed, 0 insertions, 438 deletions
diff --git a/sys-apps/file/files/file-5.26-compress-1.patch b/sys-apps/file/files/file-5.26-compress-1.patch deleted file mode 100644 index b10bfd21a32..00000000000 --- a/sys-apps/file/files/file-5.26-compress-1.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 52ae939467583ec499f6c62cdb406e8f982c0310 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Tue, 19 Apr 2016 13:39:19 +0000 -Subject: [PATCH] Fix compression code (Werner Fink) - ---- - src/compress.c | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) - -diff --git a/src/compress.c b/src/compress.c -index f322445..0ebc837 100644 ---- a/src/compress.c -+++ b/src/compress.c -@@ -231,9 +231,9 @@ file_zmagic(struct magic_set *ms, int fd, const char *name, - goto error; - DPRINTF("rv = %d\n", rv); - if ((ms->flags & MAGIC_COMPRESS_TRANSP) != 0) -- goto out; -+ break; - if (mime != MAGIC_MIME && mime != 0) -- goto out; -+ break; - if ((file_printf(ms, - mime ? " compressed-encoding=" : " (")) == -1) - goto error; -@@ -250,16 +250,19 @@ file_zmagic(struct magic_set *ms, int fd, const char *name, - } - if (!mime && file_printf(ms, ")") == -1) - goto error; -- goto out; -+ /*FALLTHROUGH*/ - case NODATA: -- goto out; -+ break; - default: - abort(); -+ /*NOTREACHED*/ -+ error: -+ rv = -1; -+ break; - } - } --out: -- rv = 1; --error: -+ DPRINTF("rv = %d\n", rv); -+ - #ifdef HAVE_SIGNAL_H - (void)signal(SIGPIPE, osigpipe); - #endif --- -2.7.4 - diff --git a/sys-apps/file/files/file-5.26-compress-2.patch b/sys-apps/file/files/file-5.26-compress-2.patch deleted file mode 100644 index d27656f7fec..00000000000 --- a/sys-apps/file/files/file-5.26-compress-2.patch +++ /dev/null @@ -1,73 +0,0 @@ -http://mx.gw.com/pipermail/file/2016/001978.html - -From 26879a2b5ec6880cb46b416880e520c628927abd Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Tue, 19 Apr 2016 23:36:36 +0000 -Subject: [PATCH] Restore part of previous logic, that breaks out of the - uncompress loop if there was a compression match error or not. Separate the - return values to avoid confusion. - ---- - src/compress.c | 23 ++++++++++++----------- - 1 file changed, 12 insertions(+), 11 deletions(-) - -diff --git a/src/compress.c b/src/compress.c -index 0ebc837..2a95f85 100644 ---- a/src/compress.c -+++ b/src/compress.c -@@ -187,7 +187,7 @@ file_zmagic(struct magic_set *ms, int fd, const char *name, - size_t i, nsz; - char *rbuf; - file_pushbuf_t *pb; -- int rv = 0; -+ int urv, prv, rv = 0; - int mime = ms->flags & MAGIC_MIME; - #ifdef HAVE_SIGNAL_H - sig_t osigpipe; -@@ -214,26 +214,26 @@ file_zmagic(struct magic_set *ms, int fd, const char *name, - if (!zm) - continue; - nsz = nbytes; -- rv = uncompressbuf(fd, ms->bytes_max, i, buf, &newbuf, &nsz); -+ urv = uncompressbuf(fd, ms->bytes_max, i, buf, &newbuf, &nsz); - DPRINTF("uncompressbuf = %d, %s, %zu\n", rv, (char *)newbuf, - nsz); -- switch (rv) { -+ switch (urv) { - case OKDATA: - case ERRDATA: - - ms->flags &= ~MAGIC_COMPRESS; -- if (rv == ERRDATA) -- rv = file_printf(ms, "%s ERROR: %s", -+ if (urv == ERRDATA) -+ prv = file_printf(ms, "%s ERROR: %s", - methodname(i), newbuf); - else -- rv = file_buffer(ms, -1, name, newbuf, nsz); -- if (rv == -1) -+ prv = file_buffer(ms, -1, name, newbuf, nsz); -+ if (prv == -1) - goto error; -- DPRINTF("rv = %d\n", rv); -+ rv = 1; - if ((ms->flags & MAGIC_COMPRESS_TRANSP) != 0) -- break; -+ goto out; - if (mime != MAGIC_MIME && mime != 0) -- break; -+ goto out; - if ((file_printf(ms, - mime ? " compressed-encoding=" : " (")) == -1) - goto error; -@@ -261,6 +261,7 @@ file_zmagic(struct magic_set *ms, int fd, const char *name, - break; - } - } -+out: - DPRINTF("rv = %d\n", rv); - - #ifdef HAVE_SIGNAL_H --- -2.7.4 - diff --git a/sys-apps/file/files/file-5.26-header-define.patch b/sys-apps/file/files/file-5.26-header-define.patch deleted file mode 100644 index 349614f8c93..00000000000 --- a/sys-apps/file/files/file-5.26-header-define.patch +++ /dev/null @@ -1,26 +0,0 @@ -http://mx.gw.com/pipermail/file/2016/001955.html - -From c4b6ea9b998882d08692599e28f4245714eaf8bb Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Sun, 17 Apr 2016 13:56:03 +0000 -Subject: [PATCH] add missing define. - ---- - src/magic.h.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/magic.h.in b/src/magic.h.in -index 1e567cd..3d6954a 100644 ---- a/src/magic.h.in -+++ b/src/magic.h.in -@@ -114,6 +114,7 @@ int magic_errno(magic_t); - #define MAGIC_PARAM_ELF_SHNUM_MAX 3 - #define MAGIC_PARAM_ELF_NOTES_MAX 4 - #define MAGIC_PARAM_REGEX_MAX 5 -+#define MAGIC_PARAM_BYTES_MAX 6 - - int magic_setparam(magic_t, int, const void *); - int magic_getparam(magic_t, int, void *); --- -2.7.4 - diff --git a/sys-apps/file/files/file-5.26-msoffice-magic.patch b/sys-apps/file/files/file-5.26-msoffice-magic.patch deleted file mode 100644 index a43d3f16dd9..00000000000 --- a/sys-apps/file/files/file-5.26-msoffice-magic.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 84609201fbbd9074f5426b991c5242a08ed78712 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Tue, 19 Apr 2016 18:14:19 +0000 -Subject: [PATCH] Strengthen the magic of relocatable microsoft objects to - avoid spurious matches (Joerg Jenderek) - ---- - magic/Magdir/xenix | 23 +++++++++++++++++++++-- - 1 file changed, 21 insertions(+), 2 deletions(-) - -diff --git a/magic/Magdir/xenix b/magic/Magdir/xenix -index 38e1e3c..ca5eaae 100644 ---- a/magic/Magdir/xenix -+++ b/magic/Magdir/xenix -@@ -12,7 +12,26 @@ - # XXX - "x.out" collides with PDP-11 archives - # - 0 string core core file (Xenix) --0 byte 0x80 8086 relocatable (Microsoft) -+# URL: http://www.polarhome.com/service/man/?qf=86rel&tf=2&of=Xenix -+# Reference: http://www.azillionmonkeys.com/qed/Omfg.pdf -+# Update: Joerg Jenderek -+# recordtype~TranslatorHEADerRecord -+0 byte 0x80 -+# GRR: line above is too general as it catches also Extensible storage engine DataBase -+# skip examples like GENA.SND Switch.Snd by looking for record length maximal 1024-3 -+>1 uleshort <1022 -+# skip examples like GAME.PICTURE Strange.Pic by looking for positiv record length -+>>1 uleshort >0 -+# skip examples like Xtable.Data FRACTAL.GEN SHR.VIEW by looking for positiv string length -+>>>3 ubyte >0 -+# skip examples like OMBRE.6 with "UUUUUU" by looking for filename like "hello.c" -+>>>>4 regex [a-zA-Z_/]{1,8}[.] 8086 relocatable (Microsoft) -+#!:mime application/octet-stream -+!:mime application/x-object -+!:ext o/a -+>>>>>3 pstring x \b, "%s" -+# checksum -+#>>>>>(3.b+4) ubyte x \b, checksum 0x%2.2x - 0 leshort 0xff65 x.out - >2 string __.SYMDEF randomized - >0 byte x archive --- -2.7.4 - diff --git a/sys-apps/file/files/file-5.26-nes-magic.patch b/sys-apps/file/files/file-5.26-nes-magic.patch deleted file mode 100644 index 0cc43b0f3d6..00000000000 --- a/sys-apps/file/files/file-5.26-nes-magic.patch +++ /dev/null @@ -1,27 +0,0 @@ -http://mx.gw.com/pipermail/file/2016/001969.html - -From 402b28ae533f5d013cd44e29eeaf64bcd4e5a925 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Mon, 18 Apr 2016 20:22:10 +0000 -Subject: [PATCH] Add missing continuation - ---- - magic/Magdir/console | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/magic/Magdir/console b/magic/Magdir/console -index ed69f43..9448223 100644 ---- a/magic/Magdir/console -+++ b/magic/Magdir/console -@@ -53,7 +53,7 @@ - # so most of the data isn't easily parseable. - # - 0 string UNIF --4 lelong <16 UNIF v%d format NES ROM image -+>4 lelong <16 UNIF v%d format NES ROM image - - #------------------------------------------------------------------------------ - # gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format --- -2.7.4 - diff --git a/sys-apps/file/files/file-5.26-php-magic.patch b/sys-apps/file/files/file-5.26-php-magic.patch deleted file mode 100644 index 310af1b6e05..00000000000 --- a/sys-apps/file/files/file-5.26-php-magic.patch +++ /dev/null @@ -1,28 +0,0 @@ -http://mx.gw.com/pipermail/file/2016/001947.html -http://mx.gw.com/pipermail/file/2016/001949.html - -From a5995b6e56c1a476360ccc58598a389f6cd71948 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Tue, 19 Apr 2016 13:40:02 +0000 -Subject: [PATCH] Fix wrong level - ---- - magic/Magdir/commands | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/magic/Magdir/commands b/magic/Magdir/commands -index 95109f3..fddb764 100644 ---- a/magic/Magdir/commands -+++ b/magic/Magdir/commands -@@ -101,7 +101,7 @@ - 0 string =<?php - >5 regex [\ \n] - >>6 string /*\ Smarty\ version Smarty compiled template -->24 regex [0-9.]+ \b, version %s -+>>>24 regex [0-9.]+ \b, version %s - !:mime text/x-php - - 0 string Zend\x00 PHP script Zend Optimizer data --- -2.7.4 - diff --git a/sys-apps/file/files/file-5.26-stdin-rpm.patch b/sys-apps/file/files/file-5.26-stdin-rpm.patch deleted file mode 100644 index 7ba5072daf1..00000000000 --- a/sys-apps/file/files/file-5.26-stdin-rpm.patch +++ /dev/null @@ -1,27 +0,0 @@ -http://mx.gw.com/pipermail/file/2016/001975.html - -From 11edb37a71851b5bcbd4e51ca6ad3dcbf57e9761 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Tue, 19 Apr 2016 20:51:54 +0000 -Subject: [PATCH] Revert: Don't close stdin... - ---- - src/magic.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/magic.c b/src/magic.c -index 46e4678..8cf6269 100644 ---- a/src/magic.c -+++ b/src/magic.c -@@ -346,7 +346,7 @@ private void - close_and_restore(const struct magic_set *ms, const char *name, int fd, - const struct stat *sb) - { -- if (name == NULL) -+ if (fd == STDIN_FILENO || name == NULL) - return; - (void) close(fd); - --- -2.7.4 - diff --git a/sys-apps/file/files/file-5.26-stdin-test.patch b/sys-apps/file/files/file-5.26-stdin-test.patch deleted file mode 100644 index 85e59a5dced..00000000000 --- a/sys-apps/file/files/file-5.26-stdin-test.patch +++ /dev/null @@ -1,132 +0,0 @@ -http://mx.gw.com/pipermail/file/2016/001963.html - -From 20c59ad54afc7427ea680f84c8ee5a576ba54b08 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Mon, 18 Apr 2016 15:10:34 +0000 -Subject: [PATCH] Downgrade DER comparison and offset lookup failures to be - handled as match failures. - ---- - src/softmagic.c | 60 ++++++++++++++++++++++++++++++++++++++------------------- - 1 file changed, 40 insertions(+), 20 deletions(-) - -diff --git a/src/softmagic.c b/src/softmagic.c -index 14a8bc5..5b5f0f9 100644 ---- a/src/softmagic.c -+++ b/src/softmagic.c -@@ -186,11 +186,11 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, - ((text && (m->str_flags & FLT) == STRING_BINTEST) || - (!text && (m->str_flags & FLT) == STRING_TEXTTEST))) || - (m->flag & mode) != mode) { -+flush: - /* Skip sub-tests */ -- while (magindex + 1 < nmagic && -- magic[magindex + 1].cont_level != 0 && -- ++magindex) -- continue; -+ while (magindex < nmagic - 1 && -+ magic[magindex + 1].cont_level != 0) -+ magindex++; - continue; /* Skip to next top-level test*/ - } - -@@ -227,10 +227,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, - * main entry didn't match, - * flush its continuations - */ -- while (magindex < nmagic - 1 && -- magic[magindex + 1].cont_level != 0) -- magindex++; -- continue; -+ goto flush; - } - - if ((e = handle_annotation(ms, m)) != 0) { -@@ -255,8 +252,14 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, - if (print && mprint(ms, m) == -1) - return -1; - -- if (moffset(ms, m, nbytes, &ms->c.li[cont_level].off) == -1) -+ switch (moffset(ms, m, nbytes, &ms->c.li[cont_level].off)) { -+ case -1: - return -1; -+ case 0: -+ goto flush; -+ default: -+ break; -+ } - - /* and any continuations that match */ - if (file_check_mem(ms, ++cont_level) == -1) -@@ -362,9 +365,16 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, - if (print && mprint(ms, m) == -1) - return -1; - -- if (moffset(ms, m, nbytes, -- &ms->c.li[cont_level].off) == -1) -+ switch (moffset(ms, m, nbytes, -+ &ms->c.li[cont_level].off)) { -+ case -1: - return -1; -+ case 0: -+ flush = 1; -+ break; -+ default: -+ break; -+ } - - if (*m->desc) - *need_separator = 1; -@@ -813,9 +823,13 @@ moffset(struct magic_set *ms, struct magic *m, size_t nbytes, int32_t *op) - case FILE_DER: - { - o = der_offs(ms, m, nbytes); -- if (o == -1) { -- file_error(ms, 0, "EOF computing DER offset"); -- return -1; -+ if (o == -1 || (size_t)o > nbytes) { -+ if ((ms->flags & MAGIC_DEBUG) != 0) { -+ (void)fprintf(stderr, -+ "Bad DER offset %d nbytes=%zu", -+ o, nbytes); -+ } -+ return 0; - } - break; - } -@@ -825,12 +839,13 @@ moffset(struct magic_set *ms, struct magic *m, size_t nbytes, int32_t *op) - break; - } - -- if ((size_t)o >= nbytes) { -- file_error(ms, 0, "Offset out of range"); -+ if ((size_t)o > nbytes) { -+ file_error(ms, 0, "Offset out of range %zu > %zu", -+ (size_t)o, nbytes); - return -1; - } - *op = o; -- return 0; -+ return 1; - } - - private uint32_t -@@ -2107,8 +2122,13 @@ magiccheck(struct magic_set *ms, struct magic *m) - return 1; - case FILE_DER: - matched = der_cmp(ms, m); -- if (matched == -1) -- file_error(ms, 0, "EOF comparing DER entries"); -+ if (matched == -1) { -+ if ((ms->flags & MAGIC_DEBUG) != 0) { -+ (void) fprintf(stderr, -+ "EOF comparing DER entries"); -+ } -+ return 0; -+ } - return matched; - default: - file_magerror(ms, "invalid type %d in magiccheck()", m->type); --- -2.7.4 - diff --git a/sys-apps/file/files/file-5.26-tests-fatal.patch b/sys-apps/file/files/file-5.26-tests-fatal.patch deleted file mode 100644 index 29c9338e9b6..00000000000 --- a/sys-apps/file/files/file-5.26-tests-fatal.patch +++ /dev/null @@ -1,27 +0,0 @@ -http://mx.gw.com/pipermail/file/2016/001961.html - -From fe1b14d68fe47a0641606c142222d6b0fb9e05d9 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Mon, 18 Apr 2016 18:16:45 +0000 -Subject: [PATCH] exit on error. - ---- - tests/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index c2cb5ee..e55cdf4 100644 ---- a/tests/Makefile.in -+++ b/tests/Makefile.in -@@ -13,7 +13,7 @@ issue311docx.testfile - T = $(top_srcdir)/tests - check-local: - MAGIC=$(top_builddir)/magic/magic ./test -- for i in $T/*.testfile; do echo Running test: $$i; MAGIC=$(top_builddir)/magic/magic ./test $$i $${i%%.testfile}.result; done -+ set -e; for i in $T/*.testfile; do echo Running test: $$i; MAGIC=$(top_builddir)/magic/magic ./test $$i $${i%%.testfile}.result; done - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. --- -2.7.4 - |