svn commit: r354939 - in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src contrib/file/tests lib/libmagic
Xin LI
delphij at FreeBSD.org
Thu Nov 21 07:39:38 UTC 2019
Author: delphij
Date: Thu Nov 21 07:39:33 2019
New Revision: 354939
URL: https://svnweb.freebsd.org/changeset/base/354939
Log:
MFC r333923, r354595, r354802:
MFV r354582: file 5.37
MFV r354798:
Apply vendor fixes:
06de62c Detect multiplication overflow when computing sector position
46a8443 Limit the number of elements in a vector (found by oss-fuzz)
Security: CVE-2019-18218
Added:
stable/11/contrib/file/magic/Magdir/biosig
- copied unchanged from r354595, head/contrib/file/magic/Magdir/biosig
stable/11/contrib/file/magic/Magdir/clojure
- copied unchanged from r354595, head/contrib/file/magic/Magdir/clojure
stable/11/contrib/file/magic/Magdir/edid
- copied unchanged from r354595, head/contrib/file/magic/Magdir/edid
stable/11/contrib/file/magic/Magdir/espressif
- copied unchanged from r354595, head/contrib/file/magic/Magdir/espressif
stable/11/contrib/file/magic/Magdir/glibc
- copied unchanged from r354595, head/contrib/file/magic/Magdir/glibc
stable/11/contrib/file/magic/Magdir/hardware
- copied unchanged from r354595, head/contrib/file/magic/Magdir/hardware
stable/11/contrib/file/magic/Magdir/kicad
- copied unchanged from r354595, head/contrib/file/magic/Magdir/kicad
stable/11/contrib/file/magic/Magdir/numpy
- copied unchanged from r354595, head/contrib/file/magic/Magdir/numpy
stable/11/contrib/file/magic/Magdir/rpmsg
- copied unchanged from r354595, head/contrib/file/magic/Magdir/rpmsg
stable/11/contrib/file/src/is_json.c
- copied unchanged from r354595, head/contrib/file/src/is_json.c
stable/11/contrib/file/tests/CVE-2014-1943.result
- copied unchanged from r354595, head/contrib/file/tests/CVE-2014-1943.result
stable/11/contrib/file/tests/CVE-2014-1943.testfile
- copied unchanged from r354595, head/contrib/file/tests/CVE-2014-1943.testfile
stable/11/contrib/file/tests/fit-map-data.result
- copied unchanged from r354595, head/contrib/file/tests/fit-map-data.result
stable/11/contrib/file/tests/fit-map-data.testfile
- copied unchanged from r354595, head/contrib/file/tests/fit-map-data.testfile
stable/11/contrib/file/tests/issue359xlsx.result
- copied unchanged from r354595, head/contrib/file/tests/issue359xlsx.result
stable/11/contrib/file/tests/issue359xlsx.testfile
- copied unchanged from r354595, head/contrib/file/tests/issue359xlsx.testfile
stable/11/contrib/file/tests/json1.result
- copied unchanged from r354595, head/contrib/file/tests/json1.result
stable/11/contrib/file/tests/json1.testfile
- copied unchanged from r354595, head/contrib/file/tests/json1.testfile
stable/11/contrib/file/tests/json2.result
- copied unchanged from r354595, head/contrib/file/tests/json2.result
stable/11/contrib/file/tests/json2.testfile
- copied unchanged from r354595, head/contrib/file/tests/json2.testfile
stable/11/contrib/file/tests/json3.result
- copied unchanged from r354595, head/contrib/file/tests/json3.result
stable/11/contrib/file/tests/json3.testfile
- copied unchanged from r354595, head/contrib/file/tests/json3.testfile
stable/11/contrib/file/tests/regex-eol.magic
- copied unchanged from r354595, head/contrib/file/tests/regex-eol.magic
stable/11/contrib/file/tests/regex-eol.result
- copied unchanged from r354595, head/contrib/file/tests/regex-eol.result
stable/11/contrib/file/tests/regex-eol.testfile
- copied unchanged from r354595, head/contrib/file/tests/regex-eol.testfile
stable/11/contrib/file/tests/zstd-3-skippable-frames.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-3-skippable-frames.result
stable/11/contrib/file/tests/zstd-dictionary-0.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-dictionary-0.result
stable/11/contrib/file/tests/zstd-dictionary-1.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-dictionary-1.result
stable/11/contrib/file/tests/zstd-dictionary-2.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-dictionary-2.result
stable/11/contrib/file/tests/zstd-skippable-frame-0.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-skippable-frame-0.result
stable/11/contrib/file/tests/zstd-skippable-frame-4.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-skippable-frame-4.result
stable/11/contrib/file/tests/zstd-skippable-frame-8.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-skippable-frame-8.result
stable/11/contrib/file/tests/zstd-skippable-frame-C.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-skippable-frame-C.result
stable/11/contrib/file/tests/zstd-v0.2-FF.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.2-FF.result
stable/11/contrib/file/tests/zstd-v0.2-FF.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.2-FF.testfile
stable/11/contrib/file/tests/zstd-v0.3-FF.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.3-FF.result
stable/11/contrib/file/tests/zstd-v0.3-FF.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.3-FF.testfile
stable/11/contrib/file/tests/zstd-v0.4-FF.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.4-FF.result
stable/11/contrib/file/tests/zstd-v0.4-FF.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.4-FF.testfile
stable/11/contrib/file/tests/zstd-v0.5-FF.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.5-FF.result
stable/11/contrib/file/tests/zstd-v0.5-FF.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.5-FF.testfile
stable/11/contrib/file/tests/zstd-v0.6-FF.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.6-FF.result
stable/11/contrib/file/tests/zstd-v0.6-FF.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.6-FF.testfile
stable/11/contrib/file/tests/zstd-v0.7-00.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-00.result
stable/11/contrib/file/tests/zstd-v0.7-21.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-21.result
stable/11/contrib/file/tests/zstd-v0.7-21.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-21.testfile
stable/11/contrib/file/tests/zstd-v0.7-22.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-22.result
stable/11/contrib/file/tests/zstd-v0.7-22.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.7-22.testfile
stable/11/contrib/file/tests/zstd-v0.8-00.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-00.result
stable/11/contrib/file/tests/zstd-v0.8-01.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-01.result
stable/11/contrib/file/tests/zstd-v0.8-01.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-01.testfile
stable/11/contrib/file/tests/zstd-v0.8-02.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-02.result
stable/11/contrib/file/tests/zstd-v0.8-02.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-02.testfile
stable/11/contrib/file/tests/zstd-v0.8-03.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-03.result
stable/11/contrib/file/tests/zstd-v0.8-03.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-03.testfile
stable/11/contrib/file/tests/zstd-v0.8-16.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-16.result
stable/11/contrib/file/tests/zstd-v0.8-16.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-16.testfile
stable/11/contrib/file/tests/zstd-v0.8-20.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-20.result
stable/11/contrib/file/tests/zstd-v0.8-20.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-20.testfile
stable/11/contrib/file/tests/zstd-v0.8-21.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-21.result
stable/11/contrib/file/tests/zstd-v0.8-21.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-21.testfile
stable/11/contrib/file/tests/zstd-v0.8-22.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-22.result
stable/11/contrib/file/tests/zstd-v0.8-22.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-22.testfile
stable/11/contrib/file/tests/zstd-v0.8-23.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-23.result
stable/11/contrib/file/tests/zstd-v0.8-23.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-23.testfile
stable/11/contrib/file/tests/zstd-v0.8-F4.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-F4.result
stable/11/contrib/file/tests/zstd-v0.8-F4.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-F4.testfile
stable/11/contrib/file/tests/zstd-v0.8-FF.result
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-FF.result
stable/11/contrib/file/tests/zstd-v0.8-FF.testfile
- copied unchanged from r354595, head/contrib/file/tests/zstd-v0.8-FF.testfile
Modified:
stable/11/contrib/file/AUTHORS
stable/11/contrib/file/COPYING
stable/11/contrib/file/ChangeLog
stable/11/contrib/file/NEWS
stable/11/contrib/file/README
stable/11/contrib/file/config.h.in
stable/11/contrib/file/configure
stable/11/contrib/file/configure.ac
stable/11/contrib/file/doc/file.man
stable/11/contrib/file/doc/libmagic.man
stable/11/contrib/file/doc/magic.man
stable/11/contrib/file/magic/Header
stable/11/contrib/file/magic/Magdir/acorn
stable/11/contrib/file/magic/Magdir/adventure
stable/11/contrib/file/magic/Magdir/algol68
stable/11/contrib/file/magic/Magdir/amigaos
stable/11/contrib/file/magic/Magdir/android
stable/11/contrib/file/magic/Magdir/animation
stable/11/contrib/file/magic/Magdir/apple
stable/11/contrib/file/magic/Magdir/archive
stable/11/contrib/file/magic/Magdir/audio
stable/11/contrib/file/magic/Magdir/basis
stable/11/contrib/file/magic/Magdir/ber
stable/11/contrib/file/magic/Magdir/bioinformatics
stable/11/contrib/file/magic/Magdir/blcr
stable/11/contrib/file/magic/Magdir/blender
stable/11/contrib/file/magic/Magdir/c-lang
stable/11/contrib/file/magic/Magdir/cad
stable/11/contrib/file/magic/Magdir/cafebabe
stable/11/contrib/file/magic/Magdir/coff
stable/11/contrib/file/magic/Magdir/commands
stable/11/contrib/file/magic/Magdir/compress
stable/11/contrib/file/magic/Magdir/console
stable/11/contrib/file/magic/Magdir/coverage
stable/11/contrib/file/magic/Magdir/ctf
stable/11/contrib/file/magic/Magdir/cups
stable/11/contrib/file/magic/Magdir/database
stable/11/contrib/file/magic/Magdir/dataone
stable/11/contrib/file/magic/Magdir/dbpf
stable/11/contrib/file/magic/Magdir/dolby
stable/11/contrib/file/magic/Magdir/dyadic
stable/11/contrib/file/magic/Magdir/ebml
stable/11/contrib/file/magic/Magdir/elf
stable/11/contrib/file/magic/Magdir/erlang
stable/11/contrib/file/magic/Magdir/esri
stable/11/contrib/file/magic/Magdir/filesystems
stable/11/contrib/file/magic/Magdir/finger
stable/11/contrib/file/magic/Magdir/flash
stable/11/contrib/file/magic/Magdir/fonts
stable/11/contrib/file/magic/Magdir/fsav
stable/11/contrib/file/magic/Magdir/games
stable/11/contrib/file/magic/Magdir/geo
stable/11/contrib/file/magic/Magdir/gnome
stable/11/contrib/file/magic/Magdir/gnu
stable/11/contrib/file/magic/Magdir/graphviz
stable/11/contrib/file/magic/Magdir/guile
stable/11/contrib/file/magic/Magdir/hitachi-sh
stable/11/contrib/file/magic/Magdir/hp
stable/11/contrib/file/magic/Magdir/ibm6000
stable/11/contrib/file/magic/Magdir/images
stable/11/contrib/file/magic/Magdir/intel
stable/11/contrib/file/magic/Magdir/isz
stable/11/contrib/file/magic/Magdir/java
stable/11/contrib/file/magic/Magdir/jpeg
stable/11/contrib/file/magic/Magdir/keepass
stable/11/contrib/file/magic/Magdir/kerberos
stable/11/contrib/file/magic/Magdir/kml
stable/11/contrib/file/magic/Magdir/linux
stable/11/contrib/file/magic/Magdir/lisp
stable/11/contrib/file/magic/Magdir/llvm
stable/11/contrib/file/magic/Magdir/lua
stable/11/contrib/file/magic/Magdir/m4
stable/11/contrib/file/magic/Magdir/macintosh
stable/11/contrib/file/magic/Magdir/mail.news
stable/11/contrib/file/magic/Magdir/map
stable/11/contrib/file/magic/Magdir/marc21
stable/11/contrib/file/magic/Magdir/matroska
stable/11/contrib/file/magic/Magdir/mercurial
stable/11/contrib/file/magic/Magdir/metastore
stable/11/contrib/file/magic/Magdir/microfocus
stable/11/contrib/file/magic/Magdir/misctools
stable/11/contrib/file/magic/Magdir/modem
stable/11/contrib/file/magic/Magdir/mozilla
stable/11/contrib/file/magic/Magdir/msdos
stable/11/contrib/file/magic/Magdir/msooxml
stable/11/contrib/file/magic/Magdir/msvc
stable/11/contrib/file/magic/Magdir/neko
stable/11/contrib/file/magic/Magdir/netbsd
stable/11/contrib/file/magic/Magdir/nitpicker
stable/11/contrib/file/magic/Magdir/ole2compounddocs
stable/11/contrib/file/magic/Magdir/palm
stable/11/contrib/file/magic/Magdir/parrot
stable/11/contrib/file/magic/Magdir/pbf
stable/11/contrib/file/magic/Magdir/pc98
stable/11/contrib/file/magic/Magdir/pgp
stable/11/contrib/file/magic/Magdir/polyml
stable/11/contrib/file/magic/Magdir/printer
stable/11/contrib/file/magic/Magdir/psl
stable/11/contrib/file/magic/Magdir/pwsafe
stable/11/contrib/file/magic/Magdir/python
stable/11/contrib/file/magic/Magdir/qt
stable/11/contrib/file/magic/Magdir/revision
stable/11/contrib/file/magic/Magdir/riff
stable/11/contrib/file/magic/Magdir/ruby
stable/11/contrib/file/magic/Magdir/scientific
stable/11/contrib/file/magic/Magdir/selinux
stable/11/contrib/file/magic/Magdir/sendmail
stable/11/contrib/file/magic/Magdir/sequent
stable/11/contrib/file/magic/Magdir/sgml
stable/11/contrib/file/magic/Magdir/sniffer
stable/11/contrib/file/magic/Magdir/sql
stable/11/contrib/file/magic/Magdir/sun
stable/11/contrib/file/magic/Magdir/sysex
stable/11/contrib/file/magic/Magdir/tcl
stable/11/contrib/file/magic/Magdir/terminfo
stable/11/contrib/file/magic/Magdir/tex
stable/11/contrib/file/magic/Magdir/tplink
stable/11/contrib/file/magic/Magdir/unicode
stable/11/contrib/file/magic/Magdir/varied.script
stable/11/contrib/file/magic/Magdir/virtual
stable/11/contrib/file/magic/Magdir/warc
stable/11/contrib/file/magic/Magdir/webassembly
stable/11/contrib/file/magic/Magdir/windows
stable/11/contrib/file/magic/Magdir/wordprocessors
stable/11/contrib/file/magic/Magdir/wsdl
stable/11/contrib/file/magic/Magdir/xwindows
stable/11/contrib/file/magic/Magdir/yara
stable/11/contrib/file/magic/Magdir/zip
stable/11/contrib/file/magic/Makefile.am
stable/11/contrib/file/magic/Makefile.in
stable/11/contrib/file/src/Makefile.am
stable/11/contrib/file/src/Makefile.in
stable/11/contrib/file/src/apprentice.c
stable/11/contrib/file/src/apptype.c
stable/11/contrib/file/src/ascmagic.c
stable/11/contrib/file/src/asprintf.c
stable/11/contrib/file/src/buffer.c
stable/11/contrib/file/src/cdf.c
stable/11/contrib/file/src/cdf.h
stable/11/contrib/file/src/cdf_time.c
stable/11/contrib/file/src/compress.c
stable/11/contrib/file/src/der.c
stable/11/contrib/file/src/dprintf.c
stable/11/contrib/file/src/elfclass.h
stable/11/contrib/file/src/encoding.c
stable/11/contrib/file/src/file.c
stable/11/contrib/file/src/file.h
stable/11/contrib/file/src/fmtcheck.c
stable/11/contrib/file/src/fsmagic.c
stable/11/contrib/file/src/funcs.c
stable/11/contrib/file/src/getopt_long.c
stable/11/contrib/file/src/is_tar.c
stable/11/contrib/file/src/magic.c
stable/11/contrib/file/src/magic.h.in
stable/11/contrib/file/src/mygetopt.h
stable/11/contrib/file/src/print.c
stable/11/contrib/file/src/readcdf.c
stable/11/contrib/file/src/readelf.c
stable/11/contrib/file/src/readelf.h
stable/11/contrib/file/src/seccomp.c
stable/11/contrib/file/src/softmagic.c
stable/11/contrib/file/src/vasprintf.c
stable/11/contrib/file/tests/Makefile.am
stable/11/contrib/file/tests/Makefile.in
stable/11/lib/libmagic/Makefile
stable/11/lib/libmagic/config.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/file/AUTHORS
==============================================================================
--- stable/11/contrib/file/AUTHORS Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/AUTHORS Thu Nov 21 07:39:33 2019 (r354939)
@@ -1 +1 @@
-See COPYING.
\ No newline at end of file
+See COPYING.
Modified: stable/11/contrib/file/COPYING
==============================================================================
--- stable/11/contrib/file/COPYING Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/COPYING Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,4 +1,4 @@
-$File: COPYING,v 1.1 2008/02/05 19:08:11 christos Exp $
+$File: COPYING,v 1.2 2018/09/09 20:33:28 christos Exp $
Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995.
Software written by Ian F. Darwin and others;
maintained 1994- Christos Zoulas.
@@ -15,7 +15,7 @@ are met:
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Modified: stable/11/contrib/file/ChangeLog
==============================================================================
--- stable/11/contrib/file/ChangeLog Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/ChangeLog Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,3 +1,75 @@
+2019-05-14 22:26 Christos Zoulas <christos at zoulas.com>
+
+ * release 5.37
+
+2019-05-09 22:27 Christos Zoulas <christos at zoulas.com>
+
+ * Make sure that continuation separators are printed
+ with -k within softmagic
+
+2019-05-06 22:27 Christos Zoulas <christos at zoulas.com>
+
+ * Change SIGPIPE saving and restoring during compression to use
+ sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko)
+ * Cache stat(2) calls more to reduce number of calls (Denys Vlasenko)
+
+2019-05-06 17:25 Christos Zoulas <christos at zoulas.com>
+
+ * PR/77: Handle --mime-type and -k correctly.
+
+2019-05-03 15:26 Christos Zoulas <christos at zoulas.com>
+
+ * Switch decompression code to use vfork() because
+ tools like rpmdiff and rpmbuild call libmagic
+ with large process footprints (Denys Vlasenko)
+
+2019-04-07 14:05 Christos Zoulas <christos at zoulas.com>
+
+ * PR/75: --enable-zlib, did not work.
+
+2019-02-27 11:54 Christos Zoulas <christos at zoulas.com>
+
+ * Improve regex efficiency (Michael Schroeder) by:
+ 1. Prefixing regex searches with regular search
+ for keywords where possible
+ 2. Using memmem(3) where available
+
+2019-02-20 10:16 Christos Zoulas <christos at zoulas.com>
+
+ * release 5.36
+
+2019-02-19 15:30 Christos Zoulas <christos at zoulas.com>
+
+ * Fix cast to use cast macros
+ * Add UCS-32 builtin detection (PR/61) reported by tmc
+
+2019-02-18 18:24 Christos Zoulas <christos at zoulas.com>
+
+ * Fix stack read (PR/62) and write (PR/64) stack overflows
+ reported by spinpx
+
+2018-10-18 19:32 Christos Zoulas <christos at zoulas.com>
+
+ * release 5.35
+
+2018-09-10 20:38 Christos Zoulas <christos at zoulas.com>
+
+ * Add FreeBSD ELF core file support (John Baldwin)
+
+2018-08-20 18:40 Christos Zoulas <christos at zoulas.com>
+
+ * PR/30: Allow all parameter values to be set (don't treat 0 specially)
+ * handle default annotations on the softmagic match instead at the
+ end.
+
+2018-07-25 10:17 Christos Zoulas <christos at zoulas.com>
+
+ * PR/23: Recognize JSON files
+
+2018-07-25 10:17 Christos Zoulas <christos at zoulas.com>
+
+ * PR/18: file --mime-encoding should not print mime-type
+
2018-07-25 8:50 Christos Zoulas <christos at zoulas.com>
* release 5.34
@@ -14,11 +86,11 @@
* release 5.33
-2018-02-24 14:50 Christos Zoulas <christos at zoulas.com>
+2018-02-24 14:50 Christos Zoulas <christos at zoulas.com>
* extend the support for ${x?:} expansions for magic descriptions
-2018-02-21 16:25 Christos Zoulas <christos at zoulas.com>
+2018-02-21 16:25 Christos Zoulas <christos at zoulas.com>
* add support for ${x?:} in mime types to handle
pie binaries.
@@ -90,7 +162,7 @@
* Add missing overflow check in der magic (Jonas Wagner)
2016-10-25 10:40 Christos Zoulas <christos at zoulas.com>
-
+
* release 5.29
2016-10-24 11:20 Christos Zoulas <christos at zoulas.com>
@@ -131,11 +203,11 @@
- set offset to 0 on failure.
2016-05-13 12:00 Christos Zoulas <christos at zoulas.com>
-
+
* release 5.27
2016-04-18 9:35 Christos Zoulas <christos at zoulas.com>
-
+
* Errors comparing DER entries or computing offsets
are just indications of malformed non-DER files.
Don't print them.
@@ -144,7 +216,7 @@
* Put new bytes constant in the right file (not the generated one)
2016-04-16 18:34 Christos Zoulas <christos at zoulas.com>
-
+
* release 5.26
2016-03-31 13:50 Christos Zoulas <christos at zoulas.com>
@@ -190,7 +262,7 @@
* PR/492: compression forking was broken with magic_buffer.
2015-09-16 9:50 Christos Zoulas <christos at zoulas.com>
-
+
* release 5.25
2015-09-11 13:25 Christos Zoulas <christos at zoulas.com>
@@ -218,7 +290,7 @@
* release 5.23
2015-06-09 16:10 Christos Zoulas <christos at zoulas.com>
-
+
* Fix issue with regex range for magic with offset
* Always return true from mget with USE (success to mget not match
indication). Fixes mime evaluation after USE magic
@@ -271,12 +343,12 @@
* add indirect relative for TIFF/Exif
2014-12-16 18:10 Christos Zoulas <christos at zoulas.com>
-
+
* restructure elf note printing to avoid repeated messages
* add note limit, suggested by Alexander Cherepanov
2014-12-16 16:53 Christos Zoulas <christos at zoulas.com>
-
+
* Bail out on partial pread()'s (Alexander Cherepanov)
* Fix incorrect bounds check in file_printable (Alexander Cherepanov)
@@ -287,7 +359,7 @@
more places for safety
* in ELF, instead of "(uses dynamic libraries)" when PT_INTERP
is present print the interpreter name.
-
+
2014-12-10 20:01 Christos Zoulas <christos at zoulas.com>
* release 5.21
@@ -330,7 +402,7 @@
on a byte by byte basis, so that we don't get issues with
locale's trying to interpret random byte streams as UTF-8 and
having printf error out with EILSEQ.
-
+
2014-10-17 11:48 Christos Zoulas <christos at zoulas.com>
* fix bounds in note reading (Francisco Alonso / Red Hat)
@@ -361,7 +433,7 @@
* release 5.19
2014-06-09 9:04 Christos Zoulas <christos at zoulas.com>
-
+
* Misc buffer overruns and missing buffer size tests in cdf parsing
(Francisco Alonso, Jan Kaluza)
@@ -391,7 +463,7 @@
2014-05-04 14:55 Christos Zoulas <christos at zoulas.com>
- * PR/351: Fix compilation of empty files
+ * PR/351: Fix compilation of empty files
2014-04-30 17:39 Christos Zoulas <christos at zoulas.com>
@@ -495,7 +567,7 @@
* Don't treat magic as an error if offset was past EOF (Christoph Biedl)
2013-05-28 17:25 Christos Zoulas <christos at zoulas.com>
-
+
* Fix spacing issues in softmagic and elf (Jan Kaluza)
2013-05-02 18:00 Christos Zoulas <christos at zoulas.com>
@@ -551,7 +623,7 @@
* Make getline public so that file can link against it.
Perhaps it is better to rename it, or hide it differently.
Fixes builds on platforms that do not provide it.
-
+
2013-01-07 16:30 Christos Zoulas <christos at zoulas.com>
* Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document
@@ -901,7 +973,7 @@
(Cheng Renquan)
2009-05-08 13:40 Christos Zoulas <christos at zoulas.com>
-
+
* lint fixes and more from NetBSD
2009-05-06 10:25 Christos Zoulas <christos at zoulas.com>
@@ -921,7 +993,7 @@
2009-03-27 18:43 Christos Zoulas <christos at zoulas.com>
- * don't print \012- separators in the same magic entry
+ * don't print \012- separators in the same magic entry
if it consists of multiple magic printing lines.
2009-03-23 10:20 Christos Zoulas <christos at zoulas.com>
Modified: stable/11/contrib/file/NEWS
==============================================================================
--- stable/11/contrib/file/NEWS Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/NEWS Thu Nov 21 07:39:33 2019 (r354939)
@@ -1 +1 @@
-See ChangeLog.
\ No newline at end of file
+See ChangeLog.
Modified: stable/11/contrib/file/README
==============================================================================
--- stable/11/contrib/file/README Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/README Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,6 +1,6 @@
-## README for file(1) Command ##
+## README for file(1) Command and the libmagic(3) library ##
- @(#) $File: README,v 1.54 2018/05/30 03:06:56 christos Exp $
+ @(#) $File: README,v 1.57 2019/02/06 00:20:56 christos Exp $
Mailing List: file at astron.com
Mailing List archives: http://mailman.astron.com/pipermail/file/
@@ -63,53 +63,54 @@ magic numbers assigned to all sorts of data files that
are in reasonable circulation. Send your magic numbers,
in magic(5) format please, to the maintainer, Christos Zoulas.
-COPYING - read this first.
-README - read this second (you are currently reading this file).
+COPYING - read this first.
+README - read this second (you are currently reading this file).
INSTALL - read on how to install
-src/apprentice.c - parses /etc/magic to learn magic
-src/apptype.c - used for OS/2 specific application type magic
-src/ascmagic.c - third & last set of tests, based on hardwired assumptions.
-src/asctime_r.c - replacement for OS's that don't have it.
-src/asprintf.c - replacement for OS's that don't have it.
-src/asctime_r.c - replacement for OS's that don't have it.
-src/asprintf.c - replacement for OS's that don't have it.
+src/apprentice.c - parses /etc/magic to learn magic
+src/apptype.c - used for OS/2 specific application type magic
+src/ascmagic.c - third & last set of tests, based on hardwired assumptions.
+src/asctime_r.c - replacement for OS's that don't have it.
+src/asprintf.c - replacement for OS's that don't have it.
+src/asctime_r.c - replacement for OS's that don't have it.
+src/asprintf.c - replacement for OS's that don't have it.
src/buffer.c - buffer handling functions.
-src/cdf.[ch] - parser for Microsoft Compound Document Files
-src/cdf_time.c - time converter for CDF.
-src/compress.c - handles decompressing files to look inside.
-src/ctime_r.c - replacement for OS's that don't have it.
+src/cdf.[ch] - parser for Microsoft Compound Document Files
+src/cdf_time.c - time converter for CDF.
+src/compress.c - handles decompressing files to look inside.
+src/ctime_r.c - replacement for OS's that don't have it.
src/der.[ch] - parser for Distinguished Encoding Rules
src/dprintf.c - replacement for OS's that don't have it.
src/elfclass.h - common code for elf 32/64.
-src/encoding.c - handles unicode encodings
-src/file.c - the main program
-src/file.h - header file
+src/encoding.c - handles unicode encodings
+src/file.c - the main program
+src/file.h - header file
src/file_opts.h - list of options
-src/fmtcheck.c - replacement for OS's that don't have it.
-src/fsmagic.c - first set of tests the program runs, based on filesystem info
-src/funcs.c - utilility functions
-src/getline.c - replacement for OS's that don't have it.
-src/getopt_long.c - replacement for OS's that don't have it.
-src/gmtime_r.c - replacement for OS's that don't have it.
-src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore).
-src/localtime_r.c - replacement for OS's that don't have it.
+src/fmtcheck.c - replacement for OS's that don't have it.
+src/fsmagic.c - first set of tests the program runs, based on filesystem info
+src/funcs.c - utilility functions
+src/getline.c - replacement for OS's that don't have it.
+src/getopt_long.c - replacement for OS's that don't have it.
+src/gmtime_r.c - replacement for OS's that don't have it.
+src/is_json.c - knows about JavaScript Object Notation format (RFC 8259).
+src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore).
+src/localtime_r.c - replacement for OS's that don't have it.
src/magic.h.in - source file for magic.h
-src/mygetopt.h - replacement for OS's that don't have it.
-src/magic.c - the libmagic api
-src/names.h - header file for ascmagic.c
-src/pread.c - replacement for OS's that don't have it.
-src/print.c - print results, errors, warnings.
-src/readcdf.c - CDF wrapper.
-src/readelf.[ch] - Stand-alone elf parsing code.
-src/softmagic.c - 2nd set of tests, based on /etc/magic
-src/mygetopt.h - replacement for OS's that don't have it.
-src/strcasestr.c - replacement for OS's that don't have it.
-src/strlcat.c - replacement for OS's that don't have it.
-src/strlcpy.c - replacement for OS's that don't have it.
-src/strndup.c - replacement for OS's that don't have it.
+src/mygetopt.h - replacement for OS's that don't have it.
+src/magic.c - the libmagic api
+src/names.h - header file for ascmagic.c
+src/pread.c - replacement for OS's that don't have it.
+src/print.c - print results, errors, warnings.
+src/readcdf.c - CDF wrapper.
+src/readelf.[ch] - Stand-alone elf parsing code.
+src/softmagic.c - 2nd set of tests, based on /etc/magic
+src/mygetopt.h - replacement for OS's that don't have it.
+src/strcasestr.c - replacement for OS's that don't have it.
+src/strlcat.c - replacement for OS's that don't have it.
+src/strlcpy.c - replacement for OS's that don't have it.
+src/strndup.c - replacement for OS's that don't have it.
src/tar.h - tar file definitions
-src/vasprintf.c - for systems that don't have it.
-doc/file.man - man page for the command
+src/vasprintf.c - for systems that don't have it.
+doc/file.man - man page for the command
doc/magic.man - man page for the magic file, courtesy Guy Harris.
Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
Modified: stable/11/contrib/file/config.h.in
==============================================================================
--- stable/11/contrib/file/config.h.in Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/config.h.in Thu Nov 21 07:39:33 2019 (r354939)
@@ -83,12 +83,6 @@
/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
@@ -98,6 +92,9 @@
/* Define to 1 if <wchar.h> declares mbstate_t. */
#undef HAVE_MBSTATE_T
+/* Define to 1 if you have the `memmem' function. */
+#undef HAVE_MEMMEM
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -116,18 +113,9 @@
/* Define to 1 if you have the `pread' function. */
#undef HAVE_PREAD
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
/* Have sig_t type */
#undef HAVE_SIG_T
-/* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
-
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@@ -137,9 +125,6 @@
/* Define to 1 if you have the `strcasestr' function. */
#undef HAVE_STRCASESTR
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -158,9 +143,6 @@
/* Define to 1 if you have the `strtof' function. */
#undef HAVE_STRTOF
-/* Define to 1 if you have the `strtoul' function. */
-#undef HAVE_STRTOUL
-
/* HAVE_STRUCT_OPTION */
#undef HAVE_STRUCT_OPTION
@@ -181,6 +163,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/sysmacros.h> header file. */
+#undef HAVE_SYS_SYSMACROS_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
Modified: stable/11/contrib/file/configure
==============================================================================
--- stable/11/contrib/file/configure Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/configure Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for file 5.34.
+# Generated by GNU Autoconf 2.69 for file 5.37.
#
# Report bugs to <christos at astron.com>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='file'
PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.34'
-PACKAGE_STRING='file 5.34'
+PACKAGE_VERSION='5.37'
+PACKAGE_STRING='file 5.37'
PACKAGE_BUGREPORT='christos at astron.com'
PACKAGE_URL=''
@@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures file 5.34 to adapt to many kinds of systems.
+\`configure' configures file 5.37 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1399,7 +1399,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of file 5.34:";;
+ short | recursive ) echo "Configuration of file 5.37:";;
esac
cat <<\_ACEOF
@@ -1511,7 +1511,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-file configure 5.34
+file configure 5.37
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2167,7 +2167,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by file $as_me 5.34, which was
+It was created by file $as_me 5.37, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3033,7 +3033,7 @@ fi
# Define the identity of the package.
PACKAGE='file'
- VERSION='5.34'
+ VERSION='5.37'
cat >>confdefs.h <<_ACEOF
@@ -12784,7 +12784,7 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
fi
-for ac_header in stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h
+for ac_header in stdint.h fcntl.h inttypes.h unistd.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12797,7 +12797,7 @@ fi
done
-for ac_header in stddef.h utime.h wchar.h wctype.h limits.h
+for ac_header in utime.h wchar.h wctype.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12810,7 +12810,7 @@ fi
done
-for ac_header in getopt.h err.h xlocale.h signal.h
+for ac_header in getopt.h err.h xlocale.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12823,7 +12823,7 @@ fi
done
-for ac_header in sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h
+for ac_header in sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12850,10 +12850,7 @@ fi
done
fi
-ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" "
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
+ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" "#include <signal.h>
"
if test "x$ac_cv_type_sig_t" = xyes; then :
@@ -12976,7 +12973,8 @@ _ACEOF
fi
-ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "$ac_includes_default"
+ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
+"
if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
cat >>confdefs.h <<_ACEOF
@@ -14229,7 +14227,7 @@ fi
fi
-for ac_func in strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale
+for ac_func in strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -14583,7 +14581,8 @@ if test "$enable_zlib" = "yes"; then
if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then
as_fn_error $? "zlib support requested but not found" "$LINENO" 5
fi
-elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then
+fi
+if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then
$as_echo "#define ZLIBSUPPORT 1" >>confdefs.h
@@ -15134,7 +15133,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by file $as_me 5.34, which was
+This file was extended by file $as_me 5.37, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15200,7 +15199,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-file config.status 5.34
+file config.status 5.37
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Modified: stable/11/contrib/file/configure.ac
==============================================================================
--- stable/11/contrib/file/configure.ac Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/configure.ac Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([file],[5.34],[christos at astron.com])
+AC_INIT([file],[5.37],[christos at astron.com])
AM_INIT_AUTOMAKE([subdir-objects foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -35,12 +35,12 @@ fi], [
])
AC_MSG_CHECKING(for zlib support)
-AC_ARG_ENABLE(zlib,
+AC_ARG_ENABLE([zlib],
[AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])])
AC_MSG_RESULT($enable_zlib)
AC_MSG_CHECKING(for libseccomp support)
-AC_ARG_ENABLE(libseccomp,
+AC_ARG_ENABLE([libseccomp],
[AS_HELP_STRING([--disable-libseccomp], [disable libseccomp sandboxing @<:@default=auto@:>@])])
AC_MSG_RESULT($enable_libseccomp)
@@ -90,17 +90,14 @@ dnl Checks for headers
AC_HEADER_STDC
AC_HEADER_MAJOR
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h)
-AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h)
-AC_CHECK_HEADERS(getopt.h err.h xlocale.h signal.h)
-AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h)
+AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h)
+AC_CHECK_HEADERS(utime.h wchar.h wctype.h)
+AC_CHECK_HEADERS(getopt.h err.h xlocale.h)
+AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h)
if test "$enable_zlib" != "no"; then
AC_CHECK_HEADERS(zlib.h)
fi
-AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif])
+AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[#include <signal.h>])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -108,7 +105,7 @@ AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
-AC_CHECK_MEMBERS([struct tm.tm_gmtoff])
+AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
AC_STRUCT_TIMEZONE
AC_STRUCT_TIMEZONE_DAYLIGHT
AC_SYS_LARGEFILE
@@ -154,7 +151,7 @@ else
fi])
dnl Checks for functions
-AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale)
+AC_CHECK_FUNCS(strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem)
dnl Provide implementation of some required functions if necessary
AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf)
@@ -178,7 +175,8 @@ if test "$enable_zlib" = "yes"; then
if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then
AC_MSG_ERROR([zlib support requested but not found])
fi
-elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then
+fi
+if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then
AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support])
fi
Modified: stable/11/contrib/file/doc/file.man
==============================================================================
--- stable/11/contrib/file/doc/file.man Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/doc/file.man Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,5 +1,5 @@
-.\" $File: file.man,v 1.131 2018/07/24 21:33:56 christos Exp $
-.Dd July 25, 2018
+.\" $File: file.man,v 1.135 2019/03/03 02:32:40 christos Exp $
+.Dd February 18, 2019
.Dt FILE __CSECTION__
.Os
.Sh NAME
@@ -159,7 +159,7 @@ two groups, so they are performed last.
The language test routines also test for some miscellany
(such as
.Xr tar 1
-archives).
+archives, JSON files).
.Pp
Any file that cannot be identified as having been written
in any of the character sets listed above is simply said to be
@@ -171,6 +171,8 @@ Causes the file command to output the file type and cr
used by older MacOS versions.
The code consists of eight letters,
the first describing the file type, the latter the creator.
+This option works properly only for file formats that have the
+apple-style output defined.
.It Fl b , Fl Fl brief
Do not prepend filenames to output lines (brief mode).
.It Fl C , Fl Fl compile
@@ -213,6 +215,8 @@ Checks for, and looks inside, compressed files.
.It elf
Prints ELF file details, provided soft magic tests are enabled and the
elf magic is found.
+.It json
+Examines JSON (RFC-7159) files by parsing them for compliance.
.It soft
Consults magic files.
.It tar
@@ -629,11 +633,11 @@ were written by John Gilmore from his public-domain
program, and are not covered by the above license.
.Sh BUGS
Please report bugs and send patches to the bug tracker at
-.Pa http://bugs.astron.com/
+.Pa https://bugs.astron.com/
or the mailing list at
.Aq file at astron.com
(visit
-.Pa http://mailman.astron.com/mailman/listinfo/file
+.Pa https://mailman.astron.com/mailman/listinfo/file
first to subscribe).
.Sh TODO
Fix output so that tests for MIME and APPLE flags are not needed all
Modified: stable/11/contrib/file/doc/libmagic.man
==============================================================================
--- stable/11/contrib/file/doc/libmagic.man Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/doc/libmagic.man Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,6 +1,6 @@
-.\" $File: libmagic.man,v 1.41 2017/05/23 21:54:07 christos Exp $
+.\" $File: libmagic.man,v 1.44 2018/09/09 20:33:28 christos Exp $
.\"
-.\" Copyright (c) Christos Zoulas 2003.
+.\" Copyright (c) Christos Zoulas 2003, 2018.
.\" All Rights Reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 23, 2017
+.Dd August 18, 2018
.Dt LIBMAGIC 3
.Os
.Sh NAME
@@ -159,6 +159,8 @@ Don't examine tar files.
Don't check for various types of text files.
.It Dv MAGIC_NO_CHECK_TOKENS
Don't look for known tokens inside ascii files.
+.It Dv MAGIC_NO_CHECK_JSON
+Don't example JSON files.
.El
.Pp
The
@@ -391,6 +393,19 @@ The compiled default magic database.
.Sh SEE ALSO
.Xr file __CSECTION__ ,
.Xr magic __FSECTION__
+.Sh BUGS
+The results from
+.Fn magic_buffer
+and
+.Fn magic_file
+where the buffer and the file contain the same data
+can produce different results, because in the
+.Fn magic_file
+case, the program can
+.Xr lseek 2
+and
+.Xr stat 2
+the file descriptor.
.Sh AUTHORS
.An M\(oans Rullg\(oard
Initial libmagic implementation, and configuration.
Modified: stable/11/contrib/file/doc/magic.man
==============================================================================
--- stable/11/contrib/file/doc/magic.man Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/doc/magic.man Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,6 +1,5 @@
-.It S2
-.\" $File: magic.man,v 1.93 2018/06/22 20:39:49 christos Exp $
-.Dd June 22, 2018
+.\" $File: magic.man,v 1.96 2019/01/21 14:56:53 christos Exp $
+.Dd January 21, 2019
.Dt MAGIC __FSECTION__
.Os
.\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems.
@@ -117,13 +116,13 @@ The following modifiers are supported:
.It B
A byte length (default).
.It H
-A 4 byte big endian length.
-.It h
A 2 byte big endian length.
+.It h
+A 2 byte little endian length.
.It L
-A 4 byte little endian length.
+A 4 byte big endian length.
.It l
-A 2 byte little endian length.
+A 4 byte little endian length.
.It J
The length includes itself in its count.
.El
Modified: stable/11/contrib/file/magic/Header
==============================================================================
--- stable/11/contrib/file/magic/Header Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/magic/Header Thu Nov 21 07:39:33 2019 (r354939)
@@ -2,4 +2,4 @@
# Format is described in magic(files), where:
# files is 5 on V7 and BSD, 4 on SV, and ?? on SVID.
# Don't edit this file, edit /etc/magic or send your magic improvements
-# to the maintainers, at file at mx.gw.com
+# to the maintainers, at file at astron.com
Modified: stable/11/contrib/file/magic/Magdir/acorn
==============================================================================
--- stable/11/contrib/file/magic/Magdir/acorn Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/magic/Magdir/acorn Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: acorn,v 1.6 2017/10/19 16:40:37 christos Exp $
+# $File: acorn,v 1.7 2019/04/19 00:42:27 christos Exp $
# acorn: file(1) magic for files found on Acorn systems
#
@@ -83,7 +83,7 @@
# compression mode y (0 - 4) for GIF LZW with a maximum n bits
# (y~n,0~12,1~13,2~14,3~15,4~16)
>>>5 ulelong+12 x \b, LZW %u-bits compression
-# http://www.filebase.org.uk/filetypes
+# https://www.filebase.org.uk/filetypes
# !Packdir compressed archive has three hexadecimal digits code 68E
!:mime application/x-acorn-68E
!:ext pkd/bin
Modified: stable/11/contrib/file/magic/Magdir/adventure
==============================================================================
--- stable/11/contrib/file/magic/Magdir/adventure Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/magic/Magdir/adventure Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: adventure,v 1.17 2017/07/03 16:03:40 christos Exp $
+# $File: adventure,v 1.18 2019/04/19 00:42:27 christos Exp $
# adventure: file(1) magic for Adventure game files
#
# from Allen Garvin <earendil at faeryland.tamu-commerce.edu>
@@ -21,8 +21,8 @@
# Updated by Adam Buchbinder <adam.buchbinder at gmail.com>
#
#http://www.gnelson.demon.co.uk/zspec/sect11.html
-#http://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt
-#http://en.wikipedia.org/wiki/Z-machine
+#https://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt
+#https://en.wikipedia.org/wiki/Z-machine
# The first byte is the Z-machine revision; it is always between 1 and 8. We
# had false matches (for instance, inbig5.ocp from the Omega TeX extension as
# well as an occasional MP3 file), so we sanity-check the version number.
@@ -111,7 +111,7 @@
# Danny Milosavljevic <danny.milo at gmx.net>
# These are ADRIFT (adventure game standard) game files, extension .taf
# Checked from source at (http://www.adrift.co/) and various taf files
-# found at the Interactive Fiction Archive (http://ifarchive.org/)
+# found at the Interactive Fiction Archive (https://ifarchive.org/)
0 belong 0x3C423FC9
>4 belong 0x6A87C2CF Adrift game file version
>>8 belong 0x94453661 3.80
Modified: stable/11/contrib/file/magic/Magdir/algol68
==============================================================================
--- stable/11/contrib/file/magic/Magdir/algol68 Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/magic/Magdir/algol68 Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,17 +1,17 @@
#------------------------------------------------------------------------------
-# $File: algol68,v 1.2 2016/10/17 14:17:48 christos Exp $
+# $File: algol68,v 1.3 2018/10/19 01:04:21 christos Exp $
# algol68: file(1) magic for Algol 68 source
#
0 search/8192 (input, Algol 68 source text
!:mime text/x-Algol68
-0 regex \^PROC Algol 68 source text
+0 regex/1024 \^PROC Algol 68 source text
!:mime text/x-Algol68
-0 regex MODE[\t\ ] Algol 68 source text
+0 regex/1024 \bMODE[\t\ ] Algol 68 source text
!:mime text/x-Algol68
-0 regex REF[\t\ ] Algol 68 source text
+0 regex/1024 \bREF[\t\ ] Algol 68 source text
!:mime text/x-Algol68
-0 regex FLEX[\t\ ]\*\\[ Algol 68 source text
+0 regex/1024 \bFLEX[\t\ ]\*\\[ Algol 68 source text
!:mime text/x-Algol68
#0 regex [\t\ ]OD Algol 68 source text
#!:mime text/x-Algol68
Modified: stable/11/contrib/file/magic/Magdir/amigaos
==============================================================================
--- stable/11/contrib/file/magic/Magdir/amigaos Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/magic/Magdir/amigaos Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: amigaos,v 1.16 2017/03/17 21:35:28 christos Exp $
+# $File: amigaos,v 1.17 2018/10/16 18:57:19 christos Exp $
# amigaos: file(1) magic for AmigaOS binary formats:
#
@@ -66,3 +66,22 @@
# From: Przemek Kramarczyk <pkramarczyk at gmail.com>
0 string .KEY AmigaDOS script
0 string .key AmigaDOS script
+
+# AMOS Basic file formats
+# https://www.exotica.org.uk/wiki/AMOS_file_formats
+0 string AMOS\040Basic\040 AMOS Basic source code
+>11 byte =0x56 \b, tested
+>11 byte =0x76 \b, untested
+0 string AMOS\040Pro AMOS Basic source code
+>11 byte =0x56 \b, tested
+>11 byte =0x76 \b, untested
+0 string AmSp AMOS Basic sprite bank
+>4 beshort x \b, %d sprites
+0 string AmIc AMOS Basic icon bank
+>4 beshort x \b, %d icons
+0 string AmBk AMOS Basic memory bank
+>4 beshort x \b, bank number %d
+>8 belong&0xFFFFFFF x \b, length %d
+>12 regex .{8} \b, type %s
+0 string AmBs AMOS Basic memory banks
+>4 beshort x \b, %d banks
Modified: stable/11/contrib/file/magic/Magdir/android
==============================================================================
--- stable/11/contrib/file/magic/Magdir/android Thu Nov 21 07:29:25 2019 (r354938)
+++ stable/11/contrib/file/magic/Magdir/android Thu Nov 21 07:39:33 2019 (r354939)
@@ -1,6 +1,6 @@
#------------------------------------------------------------
-# $File: android,v 1.10 2017/03/17 21:35:28 christos Exp $
+# $File: android,v 1.12 2019/04/19 00:42:27 christos Exp $
# Various android related magic entries
#------------------------------------------------------------
@@ -32,33 +32,68 @@
# Android Backup archive
# From: Ariel Shkedi
-# File extension: .ab
-# No mime-type defined
+# Update: Joerg Jenderek
# URL: https://github.com/android/platform_frameworks_base/blob/\
# 0bacfd2ba68d21a68a3df345b830bc2a1e515b5a/services/java/com/\
# android/server/BackupManagerService.java#L2367
+# Reference: https://sourceforge.net/projects/adbextractor/
+# android-backup-extractor/perl/backupencrypt.pl
+# Note: only unix line feeds "\n" found
# After the header comes a tar file
# If compressed, the entire tar file is compressed with JAVA deflate
#
# Include the version number hardcoded with the magic string to avoid
# false positives
-0 string/b ANDROID\ BACKUP\n1\n Android Backup
+0 string/b ANDROID\ BACKUP\n Android Backup
+# maybe look for some more characteristics like linefeed '\n' or version
+#>16 string \n
+# No mime-type defined offically
+!:mime application/x-google-ab
+!:ext ab
+# on 2nd line version (often 1, 2 on kitkat 4.4.3+, 4 on 7.1.2)
+>15 string >\0 \b, version %s
+# "1" on 3rd line means compressed
>17 string 0\n \b, Not-Compressed
>17 string 1\n \b, Compressed
+# The 4th line is encryption "none" or "AES-256"
# any string as long as it's not the word none (which is matched below)
+>19 string none\n \b, Not-Encrypted
+# look for backup content after line with encryption info
+#>>19 search/7 \n
+# data part after header for not encrypted Android Backup
+#>>>&0 ubequad x \b, content 0x%16.16llx...
+# look for zlib compressed by ./compress after message with 1 space at end
+#>>>&0 indirect x \b; contains
+# look for tar archive block by ./archive for package name manifest
+>>288 string ustar \b; contains
+>>>31 use tar-file
+# look for zip/jar archive by ./archive ./zip after message with 1 space at end
+#>>2079 search/1025/s PK\003\004 \b; contains
+#>>>&0 indirect x
+>19 string !none
>>19 regex/1l \^([^n\n]|n[^o]|no[^n]|non[^e]|none.+).* \b, Encrypted (%s)
->>19 string none\n \b, Not-Encrypted
# Commented out because they don't seem useful to print
# (but they are part of the header - the tar file comes after them):
+# The 5th line is User Password Salt (128 Hex)
+# string length too high with standard src configuration
+#>>>&1 string >\0 \b, PASSWORD salt: "%-128.128s"
#>>>&1 regex/1l .* \b, Password salt: %s
+# The 6th line is Master Key Checksum Salt (128 Hex)
#>>>>&1 regex/1l .* \b, Master salt: %s
+# The 7th line is Number of PBDKF2 Rounds (10000)
#>>>>>&1 regex/1l .* \b, PBKDF2 rounds: %s
+# The 8th line is User key Initialization Vector (IV) (32 Hex)
#>>>>>>&1 regex/1l .* \b, IV: %s
+#>>>>>>&1 regex/1l .* \b, IV: %s
+# The 9th line is Master IV+Key+Checksum (192 Hex)
#>>>>>>>&1 regex/1l .* \b, Key: %s
+# look for new line separator char after line number 9
+#>>>0x204 ubyte 0x0a NL found
+#>>>>&1 ubequad x \b, Content magic %16.16llx
# *.pit files by Joerg Jenderek
-# http://forum.xda-developers.com/showthread.php?p=9122369
-# http://forum.xda-developers.com/showthread.php?t=816449
+# https://forum.xda-developers.com/showthread.php?p=9122369
+# https://forum.xda-developers.com/showthread.php?t=816449
# Partition Information Table for Samsung's smartphone with Android
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-stable-11
mailing list