From 0018b1e7988253584c119016e43236d567d70095dc3e559080a7dc5f4f353e1b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 29 Aug 2007 20:26:43 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/file?expand=0&rev=10 --- file-4.20-CVE-2007-2799.dif | 23 ----------- file-4.20-reg_startend.dif | 38 ------------------- file-4.20-unused.dif | 28 -------------- file-4.20.tar.bz2 | 3 -- file-4.20-option.dif => file-4.21-option.dif | 20 +--------- ...-4.20-reg_dos.dif => file-4.21-reg_dos.dif | 14 ++++--- file-4.21-scribus.dif | 10 +++++ file-4.20.dif => file-4.21.dif | 23 ++++++++--- file-4.21.tar.bz2 | 3 ++ file.changes | 10 +++++ file.spec | 26 ++++++------- 11 files changed, 63 insertions(+), 135 deletions(-) delete mode 100644 file-4.20-CVE-2007-2799.dif delete mode 100644 file-4.20-reg_startend.dif delete mode 100644 file-4.20-unused.dif delete mode 100644 file-4.20.tar.bz2 rename file-4.20-option.dif => file-4.21-option.dif (54%) rename file-4.20-reg_dos.dif => file-4.21-reg_dos.dif (54%) create mode 100644 file-4.21-scribus.dif rename file-4.20.dif => file-4.21.dif (95%) create mode 100644 file-4.21.tar.bz2 diff --git a/file-4.20-CVE-2007-2799.dif b/file-4.20-CVE-2007-2799.dif deleted file mode 100644 index a119f0d..0000000 --- a/file-4.20-CVE-2007-2799.dif +++ /dev/null @@ -1,23 +0,0 @@ ---- src/funcs.c -+++ src/funcs.c 2007-05-24 14:15:36.218013250 +0200 -@@ -26,7 +26,7 @@ - */ - #include "file.h" - #include "magic.h" --#include -+#include - #include - #include - #include -@@ -247,7 +247,10 @@ file_getbuffer(struct magic_set *ms) - len = ms->o.size - ms->o.left; - /* * 4 is for octal representation, + 1 is for NUL */ - psize = len * 4 + 1; -- assert(psize > len); -+ if (len > (ULONG_MAX - 1) / 4) { -+ file_oomem(ms, len); -+ return NULL; -+ } - if (ms->o.psize < psize) { - if ((pbuf = realloc(ms->o.pbuf, psize)) == NULL) { - file_oomem(ms, psize); diff --git a/file-4.20-reg_startend.dif b/file-4.20-reg_startend.dif deleted file mode 100644 index 276a563..0000000 --- a/file-4.20-reg_startend.dif +++ /dev/null @@ -1,38 +0,0 @@ -Index: softmagic.c -=================================================================== -RCS file: /p/file/cvsroot/file/src/softmagic.c,v -retrieving revision 1.91 -retrieving revision 1.95 -diff -u -r1.91 -r1.95 ---- src/softmagic.c 18 Jan 2007 05:29:33 -0000 1.91 -+++ src/softmagic.c 3 Mar 2007 19:09:25 -0000 1.95 -@@ -38,7 +38,7 @@ - - - #ifndef lint --FILE_RCSID("@(#)$File: softmagic.c,v 1.91 2007/01/18 05:29:33 ljt Exp $") -+FILE_RCSID("@(#)$File: softmagic.c,v 1.95 2007/03/03 19:09:25 christos Exp $") - #endif /* lint */ - - private int match(struct magic_set *, struct magic *, uint32_t, -@@ -1523,10 +1523,20 @@ - } - else { - regmatch_t pmatch[1]; -+#ifndef REG_STARTEND -+#define REG_STARTEND 0 -+ size_t l = ms->search.s_len - 1; -+ char c = ms->search.s[l]; -+ ((char *)(intptr_t)ms->search.s)[l] = '\0'; -+#else - pmatch[0].rm_so = 0; - pmatch[0].rm_eo = ms->search.s_len; -+#endif - rc = regexec(&rx, (const char *)ms->search.s, - 1, pmatch, REG_STARTEND); -+#if REG_STARTEND == 0 -+ ((char *)(intptr_t)ms->search.s)[l] = c; -+#endif - switch (rc) { - case 0: - ms->search.s += (int)pmatch[0].rm_so; diff --git a/file-4.20-unused.dif b/file-4.20-unused.dif deleted file mode 100644 index 818199c..0000000 --- a/file-4.20-unused.dif +++ /dev/null @@ -1,28 +0,0 @@ ---- src/file.c -+++ src/file.c 2007-04-05 17:04:50.607194194 +0200 -@@ -358,7 +358,7 @@ main(int argc, char *argv[]) - - private void - /*ARGSUSED*/ --load(const char *m __unused, int flags) -+load(const char *m __attr_unused__, int flags) - { - if (magic) - return; ---- src/file.h -+++ src/file.h 2007-04-05 17:04:35.237181956 +0200 -@@ -79,11 +79,11 @@ - #endif - #endif - --#ifndef __unused -+#ifndef __attr_unused__ - #if __GNUC_PREREQ__(2, 7) --#define __unused __attribute__((__unused__)) -+#define __attr_unused__ __attribute__((__unused__)) - #else --#define __unused /* delete */ -+#define __attr_unused__ /* delete */ - #endif - #endif - diff --git a/file-4.20.tar.bz2 b/file-4.20.tar.bz2 deleted file mode 100644 index 9f6889d..0000000 --- a/file-4.20.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd1dbfeef939b79382e5b4e50bc49496d2457b94a995532bdea2a4c08c159369 -size 414064 diff --git a/file-4.20-option.dif b/file-4.21-option.dif similarity index 54% rename from file-4.20-option.dif rename to file-4.21-option.dif index f93c534..3c03e39 100644 --- a/file-4.20-option.dif +++ b/file-4.21-option.dif @@ -1,23 +1,5 @@ --- src/file.c -+++ src/file.c 2007-05-14 11:14:56.000000000 +0000 -@@ -128,7 +128,7 @@ main(int argc, char *argv[]) - char *home, *usermagic; - struct stat sb; - static const char hmagic[] = "/.magic"; --#define OPTSTRING "bcCdf:F:hikLm:nNprsvz0" -+#define OPTSTRING "bcCde:f:F:hikLm:nNprsvz0" - #ifdef HAVE_GETOPT_LONG - int longindex; - static const struct option long_options[] = -@@ -138,7 +138,7 @@ main(int argc, char *argv[]) - {"brief", 0, 0, 'b'}, - {"checking-printout", 0, 0, 'c'}, - {"debug", 0, 0, 'd'}, -- {"exclude", 0, 0, 'e' }, -+ {"exclude", 1, 0, 'e' }, - {"files-from", 1, 0, 'f'}, - {"separator", 1, 0, 'F'}, - {"mime", 0, 0, 'i'}, ++++ src/file.c 2007-06-06 16:33:10.402651296 +0200 @@ -240,6 +240,8 @@ main(int argc, char *argv[]) flags |= MAGIC_DEBUG|MAGIC_CHECK; break; diff --git a/file-4.20-reg_dos.dif b/file-4.21-reg_dos.dif similarity index 54% rename from file-4.20-reg_dos.dif rename to file-4.21-reg_dos.dif index c24ae2c..82ab8e0 100644 --- a/file-4.20-reg_dos.dif +++ b/file-4.21-reg_dos.dif @@ -1,17 +1,19 @@ --- magic/Magdir/msdos -+++ magic/Magdir/msdos 2007-04-16 14:54:43.942155748 +0200 -@@ -14,8 +14,12 @@ ++++ magic/Magdir/msdos 2007-06-06 16:42:16.380856618 +0200 +@@ -14,12 +14,10 @@ # OS/2 batch files are REXX. the second regex is a bit generic, oh well # the matched commands seem to be common in REXX and uncommon elsewhere +-100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text +-100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text +- +- -100 regex/c =^\\s*call\\s+rxfuncadd.*sysloadfu OS/2 REXX batch file text -100 regex/c =^\\s*say\ ['"] OS/2 REXX batch file text -+#100 regex/c =^\\s*call\\s+rxfuncadd.*sysloadfu OS/2 REXX batch file text -+#100 regex/c =^\\s*say\ ['"] OS/2 REXX batch file text +100 search/0xffff rxfuncadd -+>100 regex/c =^\\s{0,255}call\\s{1,99}rxfuncadd OS/2 REXX batch file text ++>100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text +100 search/0xffff say -+>100 regex/c =^\\s{0,255}say\ ['"] OS/2 REXX batch file text ++>100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text 0 leshort 0x14c MS Windows COFF Intel 80386 object file #>4 ledate x stamp %s diff --git a/file-4.21-scribus.dif b/file-4.21-scribus.dif new file mode 100644 index 0000000..284f153 --- /dev/null +++ b/file-4.21-scribus.dif @@ -0,0 +1,10 @@ +--- magic/Localstuff ++++ magic/Localstuff 2007-08-29 18:58:37.090251353 +0200 +@@ -29,3 +29,7 @@ + #>2 regex \(name\ [^)]*\) %s + >20 search/256 (name (name + >>&1 string x %s...) ++ ++# File magic for Scribus, an Open Source Desktop Publishing system ++0 string \