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 Import file-5.31; mostly oss-fuzz fou...



details:   https://anonhg.NetBSD.org/src/rev/93eb8f10ace8
branches:  trunk
changeset: 824124:93eb8f10ace8
user:      christos <christos%NetBSD.org@localhost>
date:      Wed May 24 23:59:56 2017 +0000

description:
Import file-5.31; mostly oss-fuzz found bugs.

diffstat:

 external/bsd/file/dist/magic/Localstuff            |    2 +-
 external/bsd/file/dist/magic/magdir/adventure      |    6 +-
 external/bsd/file/dist/magic/magdir/amanda         |    4 +-
 external/bsd/file/dist/magic/magdir/amigaos        |    6 +-
 external/bsd/file/dist/magic/magdir/android        |   12 +-
 external/bsd/file/dist/magic/magdir/animation      |   23 +-
 external/bsd/file/dist/magic/magdir/apache         |   28 ++
 external/bsd/file/dist/magic/magdir/att3b          |    4 +-
 external/bsd/file/dist/magic/magdir/audio          |   70 +++++-
 external/bsd/file/dist/magic/magdir/blackberry     |    4 +-
 external/bsd/file/dist/magic/magdir/blender        |    6 +-
 external/bsd/file/dist/magic/magdir/c-lang         |    4 +-
 external/bsd/file/dist/magic/magdir/cad            |   58 ++--
 external/bsd/file/dist/magic/magdir/cafebabe       |    8 +-
 external/bsd/file/dist/magic/magdir/clipper        |    8 +-
 external/bsd/file/dist/magic/magdir/coff           |   12 +-
 external/bsd/file/dist/magic/magdir/commands       |    4 +-
 external/bsd/file/dist/magic/magdir/compress       |    4 +-
 external/bsd/file/dist/magic/magdir/console        |   10 +-
 external/bsd/file/dist/magic/magdir/cups           |    6 +-
 external/bsd/file/dist/magic/magdir/database       |  214 +++++++++---------
 external/bsd/file/dist/magic/magdir/der            |   16 +-
 external/bsd/file/dist/magic/magdir/dolby          |    4 +-
 external/bsd/file/dist/magic/magdir/dump           |   14 +-
 external/bsd/file/dist/magic/magdir/dyadic         |    6 +-
 external/bsd/file/dist/magic/magdir/editors        |    6 +-
 external/bsd/file/dist/magic/magdir/fonts          |   34 +-
 external/bsd/file/dist/magic/magdir/fsav           |   24 +-
 external/bsd/file/dist/magic/magdir/games          |    6 +-
 external/bsd/file/dist/magic/magdir/gnu            |    4 +-
 external/bsd/file/dist/magic/magdir/gpt            |   14 +-
 external/bsd/file/dist/magic/magdir/gpu            |   14 +-
 external/bsd/file/dist/magic/magdir/gringotts      |   10 +-
 external/bsd/file/dist/magic/magdir/hitachi-sh     |   18 +-
 external/bsd/file/dist/magic/magdir/ibm370         |   10 +-
 external/bsd/file/dist/magic/magdir/ibm6000        |    4 +-
 external/bsd/file/dist/magic/magdir/icc            |   28 +-
 external/bsd/file/dist/magic/magdir/images         |  116 +++++-----
 external/bsd/file/dist/magic/magdir/intel          |    6 +-
 external/bsd/file/dist/magic/magdir/isz            |    4 +-
 external/bsd/file/dist/magic/magdir/kerberos       |    4 +-
 external/bsd/file/dist/magic/magdir/kml            |    6 +-
 external/bsd/file/dist/magic/magdir/linux          |   14 +-
 external/bsd/file/dist/magic/magdir/lisp           |   16 +-
 external/bsd/file/dist/magic/magdir/macintosh      |   20 +-
 external/bsd/file/dist/magic/magdir/maple          |    6 +-
 external/bsd/file/dist/magic/magdir/marc21         |   18 +-
 external/bsd/file/dist/magic/magdir/mathematica    |    6 +-
 external/bsd/file/dist/magic/magdir/metastore      |    4 +-
 external/bsd/file/dist/magic/magdir/meteorological |    4 +-
 external/bsd/file/dist/magic/magdir/microfocus     |    4 +-
 external/bsd/file/dist/magic/magdir/mime           |    4 +-
 external/bsd/file/dist/magic/magdir/misctools      |    6 +-
 external/bsd/file/dist/magic/magdir/modem          |   26 +-
 external/bsd/file/dist/magic/magdir/mozilla        |    4 +-
 external/bsd/file/dist/magic/magdir/msdos          |  237 ++++++++++++--------
 external/bsd/file/dist/magic/magdir/msvc           |   12 +-
 external/bsd/file/dist/magic/magdir/msx            |    6 +-
 external/bsd/file/dist/magic/magdir/mup            |   14 +-
 external/bsd/file/dist/magic/magdir/nasa           |    2 +-
 external/bsd/file/dist/magic/magdir/netscape       |    6 +-
 external/bsd/file/dist/magic/magdir/nitpicker      |    4 +-
 external/bsd/file/dist/magic/magdir/os2            |    8 +-
 external/bsd/file/dist/magic/magdir/pc88           |    2 +-
 external/bsd/file/dist/magic/magdir/pc98           |    2 +-
 external/bsd/file/dist/magic/magdir/pdp            |    6 +-
 external/bsd/file/dist/magic/magdir/perl           |   10 +-
 external/bsd/file/dist/magic/magdir/pgf            |    4 +-
 external/bsd/file/dist/magic/magdir/printer        |   22 +-
 external/bsd/file/dist/magic/magdir/project        |    4 +-
 external/bsd/file/dist/magic/magdir/psdbms         |    4 +-
 external/bsd/file/dist/magic/magdir/python         |   10 +-
 external/bsd/file/dist/magic/magdir/riff           |   12 +-
 external/bsd/file/dist/magic/magdir/sccs           |    4 +-
 external/bsd/file/dist/magic/magdir/scientific     |    6 +-
 external/bsd/file/dist/magic/magdir/sendmail       |   10 +-
 external/bsd/file/dist/magic/magdir/sequent        |    6 +-
 external/bsd/file/dist/magic/magdir/sharc          |    4 +-
 external/bsd/file/dist/magic/magdir/sketch         |    4 +-
 external/bsd/file/dist/magic/magdir/sql            |    8 +-
 external/bsd/file/dist/magic/magdir/sysex          |    4 +-
 external/bsd/file/dist/magic/magdir/terminfo       |   51 +++-
 external/bsd/file/dist/magic/magdir/vms            |    4 +-
 external/bsd/file/dist/magic/magdir/vmware         |    4 +-
 external/bsd/file/dist/magic/magdir/vorbis         |   10 +-
 external/bsd/file/dist/magic/magdir/webassembly    |   15 +
 external/bsd/file/dist/magic/magdir/windows        |  158 +++++++-------
 external/bsd/file/dist/magic/magdir/xenix          |   14 +-
 external/bsd/file/dist/magic/magdir/xilinx         |   10 +-
 external/bsd/file/dist/magic/magdir/xwindows       |    4 +-
 external/bsd/file/dist/python/magic.py             |   68 +++--
 external/bsd/file/dist/src/cdf.h                   |    8 +-
 external/bsd/file/dist/src/is_tar.c                |   41 ++-
 external/bsd/file/dist/src/readelf.h               |   34 ++-
 external/bsd/file/dist/tests/Makefile.am           |    2 +-
 95 files changed, 1026 insertions(+), 781 deletions(-)

diffs (truncated from 4824 to 300 lines):

diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/Localstuff
--- a/external/bsd/file/dist/magic/Localstuff   Wed May 24 21:45:40 2017 +0000
+++ b/external/bsd/file/dist/magic/Localstuff   Wed May 24 23:59:56 2017 +0000
@@ -2,6 +2,6 @@
 #------------------------------------------------------------------------------
 # Localstuff:  file(1) magic for locally observed files
 #
-# $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $
+# $File: Localstuff,v 1.5 2007/01/12 17:38:27 christos Exp $
 # Add any locally observed files here.  Remember:
 # text if readable, executable if runnable binary, data if unreadable.
diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/magdir/adventure
--- a/external/bsd/file/dist/magic/magdir/adventure     Wed May 24 21:45:40 2017 +0000
+++ b/external/bsd/file/dist/magic/magdir/adventure     Wed May 24 23:59:56 2017 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: adventure,v 1.15 2015/09/07 10:03:21 christos Exp $
+# $File: adventure,v 1.16 2017/03/17 21:35:28 christos Exp $
 # adventure: file(1) magic for Adventure game files
 #
 # from Allen Garvin <earendil%faeryland.tamu-commerce.edu@localhost>
@@ -78,7 +78,7 @@
 !:mime application/x-tads
 #  Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
 #  2-byte length N, the N-char name of the game file *without* a NUL (darn!),
-# "TADS2 save\n\r\032\0" and the interpreter version. 
+# "TADS2 save\n\r\032\0" and the interpreter version.
 0      string  TADS2\ save/g   TADS
 >12    belong  !0x0A0D1A00     saved game data, CORRUPTED
 >12    belong   0x0A0D1A00
@@ -109,7 +109,7 @@
 # edited by David Griffith <dave%661.org@localhost>
 # Danny Milosavljevic <danny.milo%gmx.net@localhost>
 # These are ADRIFT (adventure game standard) game files, extension .taf
-# Checked from source at (http://www.adrift.co/) and various taf files 
+# Checked from source at (http://www.adrift.co/) and various taf files
 # found at the Interactive Fiction Archive (http://ifarchive.org/)
 0      belong  0x3C423FC9
 >4     belong  0x6A87C2CF      Adrift game file version
diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/magdir/amanda
--- a/external/bsd/file/dist/magic/magdir/amanda        Wed May 24 21:45:40 2017 +0000
+++ b/external/bsd/file/dist/magic/magdir/amanda        Wed May 24 23:59:56 2017 +0000
@@ -1,9 +1,9 @@
 
 #------------------------------------------------------------------------------
-# $File: amanda,v 1.5 2009/09/19 16:28:07 christos Exp $
+# $File: amanda,v 1.6 2017/03/17 21:35:28 christos Exp $
 # amanda:  file(1) magic for amanda file format
 #
-0      string  AMANDA:\                AMANDA 
+0      string  AMANDA:\                AMANDA
 >8     string  TAPESTART\ DATE         tape header file,
 >>23   string  X
 >>>25  string  >\                      Unused %s
diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/magdir/amigaos
--- a/external/bsd/file/dist/magic/magdir/amigaos       Wed May 24 21:45:40 2017 +0000
+++ b/external/bsd/file/dist/magic/magdir/amigaos       Wed May 24 23:59:56 2017 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: amigaos,v 1.15 2012/06/21 01:13:59 christos Exp $
+# $File: amigaos,v 1.16 2017/03/17 21:35:28 christos Exp $
 # amigaos:  file(1) magic for AmigaOS binary formats:
 
 #
@@ -11,7 +11,7 @@
 0      belong          0x000003e7      AmigaOS object/library data
 #
 0      beshort         0xe310          Amiga Workbench
->2     beshort         1               
+>2     beshort         1
 >>48   byte            1               disk icon
 >>48   byte            2               drawer icon
 >>48   byte            3               tool icon
@@ -49,7 +49,7 @@
 0      string/c        @database       AmigaGuide file
 
 # Amiga disk types
-# 
+#
 0      string          RDSK            Rigid Disk Block
 >160   string          x               on %.24s
 0      string          DOS\0           Amiga DOS disk
diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/magdir/android
--- a/external/bsd/file/dist/magic/magdir/android       Wed May 24 21:45:40 2017 +0000
+++ b/external/bsd/file/dist/magic/magdir/android       Wed May 24 23:59:56 2017 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------
-# $File: android,v 1.9 2016/01/11 21:19:18 christos Exp $
+# $File: android,v 1.10 2017/03/17 21:35:28 christos Exp $
 # Various android related magic entries
 #------------------------------------------------------------
 
@@ -61,9 +61,9 @@
 # http://forum.xda-developers.com/showthread.php?t=816449
 # Partition Information Table for Samsung's smartphone with Android
 # used by flash software Odin
-0              ulelong                 0x12349876      
+0              ulelong                 0x12349876
 # 1st pit entry marker
->0x01C ulequad&0xFFFFFFFCFFFFFFFC      =0x0000000000000000     
+>0x01C ulequad&0xFFFFFFFCFFFFFFFC      =0x0000000000000000
 # minimal 13 and maximal 18 PIT entries found
 >>4            ulelong                 <128    Partition Information Table for Samsung smartphone
 >>>4           ulelong                 x       \b, %d entries
@@ -109,9 +109,9 @@
 
 0      name                    PIT-entry
 # garbage value implies end of pit entries
->0x00          ulequad&0xFFFFFFFCFFFFFFFC      =0x0000000000000000     
+>0x00          ulequad&0xFFFFFFFCFFFFFFFC      =0x0000000000000000
 # skip empty partition name
->>0x24         ubyte                           !0                      
+>>0x24         ubyte                           !0
 # partition name
 >>>0x24                string                          >\0                     %-.32s
 # flags
@@ -122,7 +122,7 @@
 >>>0x08        ulelong         x                       (0x%x)
 # filename
 >>>0x44                string                          >\0                     "%-.64s"
-#>>>0x18       ulelong                         >0                      
+#>>>0x18       ulelong                         >0
 # blocksize in 512 byte units ?
 #>>>>0x18      ulelong                         x                       \b, %db
 # partition size in blocks ?
diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/magdir/animation
--- a/external/bsd/file/dist/magic/magdir/animation     Wed May 24 21:45:40 2017 +0000
+++ b/external/bsd/file/dist/magic/magdir/animation     Wed May 24 23:59:56 2017 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: animation,v 1.59 2017/01/21 16:07:14 christos Exp $
+# $File: animation,v 1.61 2017/04/01 18:26:03 christos Exp $
 # animation:  file(1) magic for animation/movie formats
 #
 # animation formats
@@ -34,6 +34,13 @@
 !:mime image/jp2
 # http://www.ftyps.com/ with local additions
 4      string          ftyp            ISO Media
+# http://aeroquartet.com/wordpress/2016/03/05/3-xavc-s/
+>8     string          XAVC            \b, MPEG v4 system, Sony XAVC Codec
+>>96   string          x               \b, Audio "%.4s"
+>>118  beshort         x               at %dHz
+>>140  string          x               \b, Video "%.4s"
+>>168  beshort         x               %d
+>>170  beshort         x               \bx%d
 >8     string          3g2             \b, MPEG v4 system, 3GPP2
 !:mime video/3gpp2
 >>11   byte            4               \b v4 (H.263/AMR GSM 6.10)
@@ -186,13 +193,13 @@
 
 # MPEG sequences
 # Scans for all common MPEG header start codes
-0       belong             0x00000001     
+0       belong             0x00000001
 >4      byte&0x1F          0x07           JVT NAL sequence, H.264 video
 >>5      byte               66             \b, baseline
 >>5      byte               77             \b, main
 >>5      byte               88             \b, extended
 >>7      byte               x              \b @ L %u
-0        belong&0xFFFFFF00  0x00000100     
+0        belong&0xFFFFFF00  0x00000100
 >3       byte               0xBA           MPEG sequence
 !:mime  video/mpeg
 >>4      byte               &0x40          \b, v2, program multiplex
@@ -493,8 +500,8 @@
 # GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
 # GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
 # FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
-#0     beshort&0xFFFE          0xFFFE  
-#>2    ubyte&0xF0      >0x0F           
+#0     beshort&0xFFFE          0xFFFE
+#>2    ubyte&0xF0      >0x0F
 #>>2   ubyte&0xF0      <0xE1           MPEG ADTS, layer I, v1
 ## rate
 #>>>2      byte&0xF0       0x10           \b,  32 kbps
@@ -566,9 +573,9 @@
 # MP2, M2A
 0       beshort&0xFFFE  0xFFF4         MPEG ADTS, layer II, v2
 !:mime audio/mpeg
-# rate 
+# rate
 >2      byte&0xF0       0x10           \b,   8 kbps
->2      byte&0xF0       0x20           \b,  16 kbps 
+>2      byte&0xF0       0x20           \b,  16 kbps
 >2      byte&0xF0       0x30           \b,  24 kbps
 >2      byte&0xF0       0x40           \b,  32 kbps
 >2      byte&0xF0       0x50           \b,  40 kbps
@@ -636,7 +643,7 @@
 # MP3, M25A
 0       beshort&0xFFFE  0xFFE2         MPEG ADTS, layer III,  v2.5
 !:mime audio/mpeg
-# rate  
+# rate
 >2      byte&0xF0       0x10           \b,   8 kbps
 >2      byte&0xF0       0x20           \b,  16 kbps
 >2      byte&0xF0       0x30           \b,  24 kbps
diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/magdir/apache
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/magic/magdir/apache        Wed May 24 23:59:56 2017 +0000
@@ -0,0 +1,28 @@
+
+#------------------------------------------------------------------------------
+# $File: apache,v 1.1 2017/04/11 14:52:15 christos Exp $
+# apache: file(1) magic for Apache Big Data formats
+
+# Avro files
+0      string          Obj             Apache Avro
+>3     byte            x               version %d
+
+# ORC files
+# Important information is in file footer, which we can't index to :(
+0      string          ORC             Apache ORC
+
+# Parquet files
+0      string          PAR1            Apache Parquet
+
+# Hive RC files
+0      string          RCF             Apache Hive RC file
+>3     byte            x               version %d
+
+# Sequence files (and the careless first version of RC file)
+
+0      string          SEQ
+>3     byte            <6              Apache Hadoop Sequence file version %d
+>3     byte            >6              Apache Hadoop Sequence file version %d
+>3     byte            =6
+>>5    string          org.apache.hadoop.hive.ql.io.RCFile$KeyBuffer  Apache Hive RC file version 0
+>>3    default         x               Apache Hadoop Sequence file version 6
diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/magdir/att3b
--- a/external/bsd/file/dist/magic/magdir/att3b Wed May 24 21:45:40 2017 +0000
+++ b/external/bsd/file/dist/magic/magdir/att3b Wed May 24 23:59:56 2017 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: att3b,v 1.9 2014/04/30 21:41:02 christos Exp $
+# $File: att3b,v 1.10 2017/03/17 21:35:28 christos Exp $
 # att3b:  file(1) magic for AT&T 3B machines
 #
 # The `versions' should be un-commented if they work for you.
@@ -36,6 +36,6 @@
 #>18   beshort         &00040000       and MAU hardware required
 #>22   beshort         >0              - version %d
 #
-# core file for 3b2 
+# core file for 3b2
 0      string          \000\004\036\212\200    3b2 core file
 >364   string          >\0             of '%s'
diff -r 2c18c4938d0e -r 93eb8f10ace8 external/bsd/file/dist/magic/magdir/audio
--- a/external/bsd/file/dist/magic/magdir/audio Wed May 24 21:45:40 2017 +0000
+++ b/external/bsd/file/dist/magic/magdir/audio Wed May 24 23:59:56 2017 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: audio,v 1.76 2016/11/02 23:06:32 christos Exp $
+# $File: audio,v 1.79 2017/03/17 22:20:22 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),
@@ -300,7 +300,7 @@
 >>5    byte            &0x40   \b, extended header
 >>5    byte            &0x20   \b, experimental
 >>5    byte            &0x10   \b, footer present
->(6.I+10)      indirect        x       \b, contains: 
+>(6.I+10)      indirect        x       \b, contains:
 
 # NSF (NES sound file) magic
 0      string          NESM\x1a        NES Sound File
@@ -314,7 +314,7 @@
 >122   byte&0x1        =0              NTSC
 
 # NSFE (Extended NES sound file) magic
-# http://slickproductions.org/docs/NSF/nsfespec.txt 
+# http://slickproductions.org/docs/NSF/nsfespec.txt
 # From: David Pflug <david@pflug.email>
 0      string          NSFE            Extended NES Sound File
 >48    search/0x1000   auth
@@ -660,7 +660,7 @@
 
 # From Fabio R. Schmidlin <frs%pop.com.br@localhost>
 # VGM music file
-0      string          Vgm\ 
+0      string          Vgm\040
 >9     ubyte           >0      VGM Video Game Music dump v
 >>9    ubyte/16        >0      \b%d
 >>9    ubyte&0x0F      x       \b%d
@@ -725,7 +725,7 @@
 # URL:         http://www.garmin.com/
 # Reference:   http://turboccc.wikispaces.com/share/view/28622555
 # NOTE:                there exist 2 other Garmin VPM formats
-0              string  AUDIMG          
+0              string  AUDIMG
 # skip text files starting with string "AUDIMG"
 >13            ubyte           <13     Garmin Voice Processing Module
 !:mime audio/x-vpm-wav-garmin
@@ -745,16 +745,68 @@



Home | Main Index | Thread Index | Old Index