Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/file/dist from ftp.astron.com, CDF security fixes



details:   https://anonhg.NetBSD.org/src/rev/a72ffadcd1d5
branches:  trunk
changeset: 777543:a72ffadcd1d5
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Feb 22 17:48:04 2012 +0000

description:
from ftp.astron.com, CDF security fixes

diffstat:

 external/bsd/file/dist/ChangeLog                  |   52 ++++++
 external/bsd/file/dist/magic/magdir/assembler     |   14 +
 external/bsd/file/dist/magic/magdir/audio         |    3 +-
 external/bsd/file/dist/magic/magdir/c-lang        |   54 +++++-
 external/bsd/file/dist/magic/magdir/cad           |    5 +-
 external/bsd/file/dist/magic/magdir/commands      |    8 +-
 external/bsd/file/dist/magic/magdir/compress      |    9 +-
 external/bsd/file/dist/magic/magdir/cups          |   82 ++++++++++
 external/bsd/file/dist/magic/magdir/elf           |    8 +-
 external/bsd/file/dist/magic/magdir/games         |   10 +-
 external/bsd/file/dist/magic/magdir/gnu           |   29 ++-
 external/bsd/file/dist/magic/magdir/guile         |   13 +
 external/bsd/file/dist/magic/magdir/images        |    9 +-
 external/bsd/file/dist/magic/magdir/java          |    5 +-
 external/bsd/file/dist/magic/magdir/linux         |    7 +-
 external/bsd/file/dist/magic/magdir/m4            |    6 +
 external/bsd/file/dist/magic/magdir/mail.news     |    8 +-
 external/bsd/file/dist/magic/magdir/make          |   15 +
 external/bsd/file/dist/magic/magdir/msdos         |  108 ++++++------
 external/bsd/file/dist/magic/magdir/music         |   17 ++
 external/bsd/file/dist/magic/magdir/netbsd        |   41 +++++-
 external/bsd/file/dist/magic/magdir/palm          |  111 +++++++------
 external/bsd/file/dist/magic/magdir/pascal        |   10 +
 external/bsd/file/dist/magic/magdir/perl          |    8 +-
 external/bsd/file/dist/magic/magdir/python        |    5 +-
 external/bsd/file/dist/magic/magdir/sgml          |    8 +-
 external/bsd/file/dist/magic/magdir/varied.script |   15 +-
 external/bsd/file/dist/magic/magdir/virtual       |   12 +-
 external/bsd/file/dist/magic/magdir/zfs           |   96 ++++++++++++
 external/bsd/file/dist/python/magic.py            |   22 ++-
 external/bsd/file/dist/src/Makefile.am            |    2 +-
 external/bsd/file/dist/src/ascmagic.c             |   98 +----------
 external/bsd/file/dist/src/cdf.h                  |  176 +++++++++++----------
 external/bsd/file/dist/src/encoding.c             |   11 +-
 external/bsd/file/dist/src/file.c                 |    8 +-
 external/bsd/file/dist/src/getline.c              |    4 +-
 external/bsd/file/dist/src/getopt_long.c          |    6 +-
 external/bsd/file/dist/src/magic.h                |   14 +-
 external/bsd/file/dist/src/mygetopt.h             |    4 +-
 external/bsd/file/dist/src/vasprintf.c            |    9 +-
 40 files changed, 756 insertions(+), 366 deletions(-)

diffs (truncated from 2047 to 300 lines):

diff -r 70d1b92c8ce1 -r a72ffadcd1d5 external/bsd/file/dist/ChangeLog
--- a/external/bsd/file/dist/ChangeLog  Wed Feb 22 17:47:25 2012 +0000
+++ b/external/bsd/file/dist/ChangeLog  Wed Feb 22 17:48:04 2012 +0000
@@ -1,3 +1,55 @@
+2012-02-20  17:33  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann)
+
+2011-12-15  12:17  Chris Metcalf <cmetcalf%tilera.com@localhost>
+
+       * Support Tilera architectures (tile64, tilepro, tilegx).
+
+2011-12-16  16:33  Reuben Thomas <rrt%sc3d.org@localhost>
+
+       * Add magic for /usr/bin/env Perl scripts
+       * Weaken generic script magic to avoid clashing with
+       language-specific magic.
+
+2011-12-08  13:37  Reuben Thomas <rrt%sc3d.org@localhost>
+
+       * Simplify if (p) free(p) to free(p).
+
+2011-12-08  13:07  Reuben Thomas <rrt%sc3d.org@localhost>
+
+       * Remove hardwired token finding (names.h), turning it into soft
+       magic. Patterns are either anchored regexs or search/8192. English
+       language detection and PL/1 detection have been removed as they
+       were too fragile. -e tokens is still accepted for backwards
+       compatibility.
+       * Move 3ds patterns (which are commented out anyway) into autodesk
+       (they were, oddly, in c-lang).
+
+2011-12-06  00:16  Reuben Thomas <rrt%sc3d.org@localhost>
+
+       * Tweak strength of generic hash-bang detectors to be less than
+       specific ones.
+       * Make an inconsistent description of Python scripts consistent.
+
+2011-12-05  23:58  Reuben Thomas <rrt%sc3d.org@localhost>
+
+       * Fix minor error in file(1).
+
+2011-11-05  00:00  Reuben Thomas <rrt%sc3d.org@localhost>
+
+       * Fix issue #150 (I hope).
+
+2011-09-22  12:57  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * Python3 binding fixes from Kelly Anderson
+
+2011-09-20  11:32  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * If a string type magic entry is marked as text or binary
+         only match text files against text entries and binary
+         files against binary entries.
+
 2011-09-01  12:12  Christos Zoulas <christos%zoulas.com@localhost>
 
        * Don't wait for any subprocess, just the one we forked.
diff -r 70d1b92c8ce1 -r a72ffadcd1d5 external/bsd/file/dist/magic/magdir/assembler
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/magic/magdir/assembler     Wed Feb 22 17:48:04 2012 +0000
@@ -0,0 +1,14 @@
+#------------------------------------------------------------------------------
+# $File: assembler,v 1.1 2011/12/08 12:12:46 rrt Exp $
+# make:  file(1) magic for assembler source
+#
+0      regex   \^\.asciiz\?    assembler source text
+!:mime text/x-asm
+0      regex   \^\.byte                assembler source text
+!:mime text/x-asm
+0      regex   \^\.even                assembler source text
+!:mime text/x-asm
+0      regex   \^\.globl               assembler source text
+!:mime text/x-asm
+0      regex   \^\.text                assembler source text
+!:mime text/x-asm
diff -r 70d1b92c8ce1 -r a72ffadcd1d5 external/bsd/file/dist/magic/magdir/audio
--- a/external/bsd/file/dist/magic/magdir/audio Wed Feb 22 17:47:25 2012 +0000
+++ b/external/bsd/file/dist/magic/magdir/audio Wed Feb 22 17:48:04 2012 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: audio,v 1.63 2011/09/06 11:00:06 christos Exp $
+# $File: audio,v 1.64 2012/02/20 16:37:34 christos Exp $
 # audio:  file(1) magic for sound formats (see also "iff")
 #
 # Jan Nicolai Langfeldt (janl%ifi.uio.no@localhost), Dan Quinlan (quinlan%yggdrasil.com@localhost),
@@ -491,6 +491,7 @@
 # From danny.milo%gmx.net@localhost (Danny Milosavljevic)
 # New version from Abel Cheung <abel (@) oaka.org>
 0              string          MAC\040         Monkey's Audio compressed format
+!:mime audio/x-ape
 >4             uleshort        >0x0F8B         version %d
 >>(0x08.l)     uleshort        =1000           with fast compression
 >>(0x08.l)     uleshort        =2000           with normal compression
diff -r 70d1b92c8ce1 -r a72ffadcd1d5 external/bsd/file/dist/magic/magdir/c-lang
--- a/external/bsd/file/dist/magic/magdir/c-lang        Wed Feb 22 17:47:25 2012 +0000
+++ b/external/bsd/file/dist/magic/magdir/c-lang        Wed Feb 22 17:48:04 2012 +0000
@@ -1,21 +1,49 @@
-
 #------------------------------------------------------------------------------
-# $File: c-lang,v 1.14 2009/09/19 16:28:08 christos Exp $
-# c-lang:  file(1) magic for C programs (or REXX)
+# $File: c-lang,v 1.16 2011/12/09 08:02:16 rrt Exp $
+# c-lang:  file(1) magic for C and related languages programs
 #
 
-# XPM icons (Greg Roelofs, newt%uchicago.edu@localhost)
-# if you uncomment "/*" for C/REXX below, also uncomment this entry
-#0     string          /*\ XPM\ */     X pixmap image data
-#!:mime        image/x-xpmi
+# BCPL
+0      search/8192     "libhdr"        BCPL source text
+!:mime text/x-bcpl
+0      search/8192     "LIBHDR"        BCPL source text
+!:mime text/x-bcpl
 
-# 3DS (3d Studio files) Conflicts with diff output 0x3d '='
-#16    beshort         0x3d3d          image/x-3ds
+# C
+0      regex   \^#include      C source text
+!:mime text/x-c
+0      regex   \^char          C source text
+!:mime text/x-c
+0      regex   \^double                C source text
+!:mime text/x-c
+0      regex   \^extern                C source text
+!:mime text/x-c
+0      regex   \^float         C source text
+!:mime text/x-c
+0      regex   \^struct                C source text
+!:mime text/x-c
+0      regex   \^union         C source text
+!:mime text/x-c
+0      search/8192     main(           C source text
+!:mime text/x-c
 
-# this first will upset you if you're a PL/1 shop...
-# in which case rm it; ascmagic will catch real C programs
-#0     search/1        /*              C or REXX program text
-#0     search/1        //              C++ program text
+# C++
+# The strength of these rules is increased so they beat the C rules above
+0      regex   \^template      C++ source text
+!:strength + 10
+!:mime text/x-c++
+0      regex   \^virtual               C++ source text
+!:strength + 10
+!:mime text/x-c++
+0      regex   \^class         C++ source text
+!:strength + 10
+!:mime text/x-c++
+0      regex   \^public:               C++ source text
+!:strength + 10
+!:mime text/x-c++
+0      regex   \^private:              C++ source text
+!:strength + 10
+!:mime text/x-c++
 
 # From: Mikhail Teterin <mi%aldan.algebra.com@localhost> 
 0      string          cscope          cscope reference data
diff -r 70d1b92c8ce1 -r a72ffadcd1d5 external/bsd/file/dist/magic/magdir/cad
--- a/external/bsd/file/dist/magic/magdir/cad   Wed Feb 22 17:47:25 2012 +0000
+++ b/external/bsd/file/dist/magic/magdir/cad   Wed Feb 22 17:48:04 2012 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: cad,v 1.10 2010/12/25 14:33:43 christos Exp $
+# $File: cad,v 1.11 2011/12/08 12:12:46 rrt Exp $
 # autocad:  file(1) magic for cad files
 #
 
@@ -113,3 +113,6 @@
 0      string  AC1012          AutoDesk AutoCAD R13
 0      string  AC1014          AutoDesk AutoCAD R14 
 0      string  AC1015          AutoDesk AutoCAD R2000
+
+# 3DS (3d Studio files) Conflicts with diff output 0x3d '='
+#16    beshort         0x3d3d          image/x-3ds
diff -r 70d1b92c8ce1 -r a72ffadcd1d5 external/bsd/file/dist/magic/magdir/commands
--- a/external/bsd/file/dist/magic/magdir/commands      Wed Feb 22 17:47:25 2012 +0000
+++ b/external/bsd/file/dist/magic/magdir/commands      Wed Feb 22 17:48:04 2012 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: commands,v 1.41 2011/05/02 12:36:41 christos Exp $
+# $File: commands,v 1.42 2011/12/05 23:14:02 rrt Exp $
 # commands:  file(1) magic for various shells and interpreters
 #
 #0     string/w        :                       shell archive or script for antique kernel text
@@ -64,12 +64,6 @@
 0      string/wt       #!\ /usr/local/bin/bash Bourne-Again shell script text executable
 !:mime text/x-shellscript
 
-# using env
-0      string/t        #!/usr/bin/env          a
->15    string/t        >\0                     %s script text executable
-0      string/t        #!\ /usr/bin/env        a
->16    string/t        >\0                     %s script text executable
-
 # PHP scripts
 # Ulf Harnhammar <ulfh%update.uu.se@localhost>
 0      search/1/c      =<?php                  PHP script text
diff -r 70d1b92c8ce1 -r a72ffadcd1d5 external/bsd/file/dist/magic/magdir/compress
--- a/external/bsd/file/dist/magic/magdir/compress      Wed Feb 22 17:47:25 2012 +0000
+++ b/external/bsd/file/dist/magic/magdir/compress      Wed Feb 22 17:48:04 2012 +0000
@@ -1,5 +1,5 @@
 #------------------------------------------------------------------------------
-# $File: compress,v 1.47 2011/03/08 00:39:46 christos Exp $
+# $File: compress,v 1.49 2011/12/07 22:04:27 christos Exp $
 # compress:  file(1) magic for pure-compression formats (no archives)
 #
 # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
@@ -190,9 +190,10 @@
 !:mime application/x-7z-compressed
 
 # Type: LZMA
-0      lelong          0x8000005d              LZMA compressed data,
->5     lequad          =0xffffffffffffffff     streamed
->5     lequad          !0xffffffffffffffff     non-streamed, size %lld
+0      lelong&0xffffff =0x5d
+>12    leshort         =0xff                   LZMA compressed data,
+>>5    lequad          =0xffffffffffffffff     streamed
+>>5    lequad          !0xffffffffffffffff     non-streamed, size %lld
 !:mime application/x-lzma
 
 # http://tukaani.org/xz/xz-file-format.txt
diff -r 70d1b92c8ce1 -r a72ffadcd1d5 external/bsd/file/dist/magic/magdir/cups
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/magic/magdir/cups  Wed Feb 22 17:48:04 2012 +0000
@@ -0,0 +1,82 @@
+
+#------------------------------------------------------------------------------
+# $File: cups,v 1.1 2011/11/10 18:59:54 christos Exp $
+# Cups: file(1) magic for the cups raster file format
+# From: Laurent Martelli <martellilaurent%gmail.com@localhost>
+# http://www.cups.org/documentation.php/spec-raster.html
+#
+
+# Cups Raster image format, Big Endian
+0      string          RaS             
+!:mime application/vnd.cups-raster
+>3     string          t               Cups Raster version 1, Big Endian
+>3     string          2               Cups Raster version 2, Big Endian
+>3     string          3               Cups Raster version 3, Big Endian
+>280   belong          x               \b, %d
+>284   belong          x               \bx%d dpi
+>376   belong          x               \b, %dx
+>380   belong          x               \b%d pixels
+>388   belong          x               %d bits/color
+>392   belong          x               %d bits/pixel
+>400   belong          0               ColorOrder=Chunky
+>400   belong          1               ColorOrder=Banded
+>400   belong          2               ColorOrder=Planar
+>404   belong          0               ColorSpace=gray
+>404   belong          1               ColorSpace=RGB
+>404   belong          2               ColorSpace=RGBA
+>404   belong          3               ColorSpace=black
+>404   belong          4               ColorSpace=CMY
+>404   belong          5               ColorSpace=YMC
+>404   belong          6               ColorSpace=CMYK
+>404   belong          7               ColorSpace=YMCK
+>404   belong          8               ColorSpace=KCMY
+>404   belong          9               ColorSpace=KCMYcm
+>404   belong          10              ColorSpace=GMCK
+>404   belong          11              ColorSpace=GMCS
+>404   belong          12              ColorSpace=WHITE
+>404   belong          13              ColorSpace=GOLD
+>404   belong          14              ColorSpace=SILVER
+>404   belong          15              ColorSpace=CIE XYZ
+>404   belong          16              ColorSpace=CIE Lab
+>404   belong          17              ColorSpace=RGBW
+>404   belong          18              ColorSpace=sGray
+>404   belong          19              ColorSpace=sRGB
+>404   belong          20              ColorSpace=AdobeRGB
+
+
+# Cups Raster image format, Little Endian
+1      string          SaR             
+>0     string          t               Cups Raster version 1, Little Endian
+>0     string          2               Cups Raster version 2, Little Endian
+>0     string          3               Cups Raster version 3, Little Endian
+!:mime application/vnd.cups-raster
+>280   lelong          x               \b, %d
+>284   lelong          x               \bx%d dpi
+>376   lelong          x               \b, %dx
+>380   lelong          x               \b%d pixels
+>388   lelong          x               %d bits/color
+>392   lelong          x               %d bits/pixel
+>400   lelong          0               ColorOrder=Chunky
+>400   lelong          1               ColorOrder=Banded
+>400   lelong          2               ColorOrder=Planar
+>404   lelong          0               ColorSpace=gray
+>404   lelong          1               ColorSpace=RGB
+>404   lelong          2               ColorSpace=RGBA
+>404   lelong          3               ColorSpace=black
+>404   lelong          4               ColorSpace=CMY
+>404   lelong          5               ColorSpace=YMC
+>404   lelong          6               ColorSpace=CMYK



Home | Main Index | Thread Index | Old Index