Source-Changes-HG archive

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

[src/CHRISTOS]: src/external/bsd/file/dist Import 5.38:



details:   https://anonhg.NetBSD.org/src/rev/7f56d1bee5a1
branches:  CHRISTOS
changeset: 466285:7f56d1bee5a1
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Dec 17 02:23:52 2019 +0000

description:
Import 5.38:
        - Always accept -S (no sandbox) even if we don't support sandboxing
        - More syscalls elided for sandboxiing
        - For ELF dynamic means having an interpreter not just PT_DYNAMIC
        - Check for large ELF session header offset
        - When saving and restoring a locale, keep the locale name in our
          own storage.
        - Add a flag to disable CSV file detection.
        - Don't pass NULL/0 to memset to appease sanitizers.
        - Avoid spurious prints when looks for extensions or apple strings
          in fsmagic.
        - Add builtin decompressors for xz and and bzip.
        - Add a limit for the number of CDF elements.
        - More checks for overflow in CDF.

diffstat:

 external/bsd/file/dist/ChangeLog                     |    20 +
 external/bsd/file/dist/Makefile.in                   |    26 +-
 external/bsd/file/dist/README                        |     7 +-
 external/bsd/file/dist/aclocal.m4                    |   263 +-
 external/bsd/file/dist/compile                       |    13 +-
 external/bsd/file/dist/config.guess                  |   670 +-
 external/bsd/file/dist/config.h.in                   |    24 +-
 external/bsd/file/dist/config.sub                    |  2751 ++++----
 external/bsd/file/dist/configure                     |  2721 ++++---
 external/bsd/file/dist/configure.ac                  |    41 +-
 external/bsd/file/dist/depcomp                       |    10 +-
 external/bsd/file/dist/doc/Makefile.in               |    14 +-
 external/bsd/file/dist/doc/file.1                    |    15 +-
 external/bsd/file/dist/doc/libmagic.3                |    10 +-
 external/bsd/file/dist/doc/magic.5                   |    10 +-
 external/bsd/file/dist/ltmain.sh                     |  5827 +++++++++++------
 external/bsd/file/dist/m4/libtool.m4                 |  2583 ++++---
 external/bsd/file/dist/m4/ltoptions.m4               |   127 +-
 external/bsd/file/dist/m4/ltsugar.m4                 |     7 +-
 external/bsd/file/dist/m4/ltversion.m4               |    12 +-
 external/bsd/file/dist/m4/lt~obsolete.m4             |     7 +-
 external/bsd/file/dist/magic/Makefile.am             |    10 +-
 external/bsd/file/dist/magic/Makefile.in             |    24 +-
 external/bsd/file/dist/magic/magdir/android          |    16 +-
 external/bsd/file/dist/magic/magdir/animation        |    89 +-
 external/bsd/file/dist/magic/magdir/apple            |    60 +-
 external/bsd/file/dist/magic/magdir/archive          |    60 +-
 external/bsd/file/dist/magic/magdir/audio            |    49 +-
 external/bsd/file/dist/magic/magdir/bsi              |     2 +-
 external/bsd/file/dist/magic/magdir/c-lang           |     4 +-
 external/bsd/file/dist/magic/magdir/cad              |   187 +-
 external/bsd/file/dist/magic/magdir/commands         |     5 +-
 external/bsd/file/dist/magic/magdir/compress         |    20 +-
 external/bsd/file/dist/magic/magdir/console          |    95 +-
 external/bsd/file/dist/magic/magdir/database         |    37 +-
 external/bsd/file/dist/magic/magdir/elf              |     9 +-
 external/bsd/file/dist/magic/magdir/espressif        |     4 +-
 external/bsd/file/dist/magic/magdir/filesystems      |    60 +-
 external/bsd/file/dist/magic/magdir/fonts            |    56 +-
 external/bsd/file/dist/magic/magdir/forth            |    80 +
 external/bsd/file/dist/magic/magdir/frame            |    24 +-
 external/bsd/file/dist/magic/magdir/games            |     6 +-
 external/bsd/file/dist/magic/magdir/gimp             |    32 +-
 external/bsd/file/dist/magic/magdir/git              |    13 +
 external/bsd/file/dist/magic/magdir/icc              |     4 +-
 external/bsd/file/dist/magic/magdir/images           |   290 +-
 external/bsd/file/dist/magic/magdir/javascript       |     7 +-
 external/bsd/file/dist/magic/magdir/kml              |     6 +-
 external/bsd/file/dist/magic/magdir/linux            |     7 +-
 external/bsd/file/dist/magic/magdir/macintosh        |    39 +-
 external/bsd/file/dist/magic/magdir/mail.news        |    13 +-
 external/bsd/file/dist/magic/magdir/map              |    79 +-
 external/bsd/file/dist/magic/magdir/modulefile       |     9 +
 external/bsd/file/dist/magic/magdir/msdos            |   284 +-
 external/bsd/file/dist/magic/magdir/msooxml          |     4 +-
 external/bsd/file/dist/magic/magdir/ole2compounddocs |   484 +-
 external/bsd/file/dist/magic/magdir/openfst          |    17 +
 external/bsd/file/dist/magic/magdir/opentimestamps   |    16 +
 external/bsd/file/dist/magic/magdir/pdf              |     8 +-
 external/bsd/file/dist/magic/magdir/pmem             |    46 +
 external/bsd/file/dist/magic/magdir/python           |    25 +-
 external/bsd/file/dist/magic/magdir/rpi              |    16 +-
 external/bsd/file/dist/magic/magdir/rst              |    11 +
 external/bsd/file/dist/magic/magdir/ruby             |     6 +-
 external/bsd/file/dist/magic/magdir/sgml             |     6 +-
 external/bsd/file/dist/magic/magdir/sniffer          |     8 +-
 external/bsd/file/dist/magic/magdir/sosi             |    40 +
 external/bsd/file/dist/magic/magdir/ssh              |     6 +
 external/bsd/file/dist/magic/magdir/uuencode         |     7 +-
 external/bsd/file/dist/magic/magdir/varied.script    |    10 +-
 external/bsd/file/dist/magic/magdir/vax              |    19 +-
 external/bsd/file/dist/magic/magdir/windows          |   122 +-
 external/bsd/file/dist/magic/magdir/wordprocessors   |    50 +-
 external/bsd/file/dist/magic/magdir/zip              |     4 +-
 external/bsd/file/dist/missing                       |    16 +-
 external/bsd/file/dist/python/Makefile.in            |    14 +-
 external/bsd/file/dist/src/Makefile.am               |     4 +-
 external/bsd/file/dist/src/Makefile.in               |   279 +-
 external/bsd/file/dist/src/apprentice.c              |    18 +-
 external/bsd/file/dist/src/ascmagic.c                |     7 +-
 external/bsd/file/dist/src/buffer.c                  |     7 +-
 external/bsd/file/dist/src/cdf.c                     |    31 +-
 external/bsd/file/dist/src/cdf.h                     |     3 +-
 external/bsd/file/dist/src/compress.c                |   200 +-
 external/bsd/file/dist/src/encoding.c                |     7 +-
 external/bsd/file/dist/src/file.c                    |    22 +-
 external/bsd/file/dist/src/file.h                    |     5 +-
 external/bsd/file/dist/src/file_opts.h               |     9 +-
 external/bsd/file/dist/src/fsmagic.c                 |    12 +-
 external/bsd/file/dist/src/funcs.c                   |    27 +-
 external/bsd/file/dist/src/is_csv.c                  |   203 +
 external/bsd/file/dist/src/magic.h.in                |     2 +
 external/bsd/file/dist/src/readcdf.c                 |    15 +-
 external/bsd/file/dist/src/readelf.c                 |    18 +-
 external/bsd/file/dist/src/seccomp.c                 |    28 +-
 external/bsd/file/dist/src/vasprintf.c               |     8 +-
 external/bsd/file/dist/tests/JW07022A.mp3.result     |     2 +-
 external/bsd/file/dist/tests/Makefile.in             |    55 +-
 external/bsd/file/dist/tests/test.c                  |     6 +-
 99 files changed, 11731 insertions(+), 7010 deletions(-)

diffs (truncated from 32174 to 300 lines):

diff -r 6ccf14049ea8 -r 7f56d1bee5a1 external/bsd/file/dist/ChangeLog
--- a/external/bsd/file/dist/ChangeLog  Wed May 22 17:19:56 2019 +0000
+++ b/external/bsd/file/dist/ChangeLog  Tue Dec 17 02:23:52 2019 +0000
@@ -1,3 +1,23 @@
+2019-12-16  21:11  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * release 5.38
+
+2019-12-15  22:13  Christos Zoulas <christos%zoulas.com@localhost>
+    Document changes since the previous release:
+       - Always accept -S (no sandbox) even if we don't support sandboxing
+       - More syscalls elided for sandboxiing
+       - For ELF dynamic means having an interpreter not just PT_DYNAMIC
+       - Check for large ELF session header offset
+       - When saving and restoring a locale, keep the locale name in our
+         own storage.
+       - Add a flag to disable CSV file detection.
+       - Don't pass NULL/0 to memset to appease sanitizers.
+       - Avoid spurious prints when looks for extensions or apple strings
+         in fsmagic.
+       - Add builtin decompressors for xz and and bzip.
+       - Add a limit for the number of CDF elements.
+       - More checks for overflow in CDF.
+
 2019-05-14  22:26  Christos Zoulas <christos%zoulas.com@localhost>
 
        * release 5.37
diff -r 6ccf14049ea8 -r 7f56d1bee5a1 external/bsd/file/dist/Makefile.in
--- a/external/bsd/file/dist/Makefile.in        Wed May 22 17:19:56 2019 +0000
+++ b/external/bsd/file/dist/Makefile.in        Tue Dec 17 02:23:52 2019 +0000
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -136,7 +136,7 @@
   $(RECURSIVE_CLEAN_TARGETS) \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-       cscope distdir dist dist-all distcheck
+       cscope distdir distdir-am dist dist-all distcheck
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
        $(LISP)config.h.in
 # Read a list of newline-separated strings from the standard input,
@@ -161,7 +161,7 @@
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
        COPYING ChangeLog INSTALL NEWS README TODO compile \
-       config.guess config.sub depcomp install-sh ltmain.sh missing
+       config.guess config.sub install-sh ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -246,6 +246,7 @@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MINGW = @MINGW@
@@ -352,8 +353,8 @@
            echo ' $(SHELL) ./config.status'; \
            $(SHELL) ./config.status;; \
          *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -495,7 +496,10 @@
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
        -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
        $(am__remove_distdir)
        test -d "$(distdir)" || mkdir "$(distdir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -560,7 +564,7 @@
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
        $(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -586,7 +590,7 @@
        @echo WARNING: "Support for shar distribution archives is" \
                       "deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -604,7 +608,7 @@
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lz*) \
@@ -614,7 +618,7 @@
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
diff -r 6ccf14049ea8 -r 7f56d1bee5a1 external/bsd/file/dist/README
--- a/external/bsd/file/dist/README     Wed May 22 17:19:56 2019 +0000
+++ b/external/bsd/file/dist/README     Tue Dec 17 02:23:52 2019 +0000
@@ -1,6 +1,6 @@
 ## README for file(1) Command and the libmagic(3) library ##
 
-    @(#) $File: README,v 1.57 2019/02/06 00:20:56 christos Exp $
+    @(#) $File: README,v 1.59 2019/09/19 01:04:01 christos Exp $
 
 Mailing List: file%astron.com@localhost
 Mailing List archives: http://mailman.astron.com/pipermail/file/
@@ -24,6 +24,10 @@
 
        https://github.com/file/file
 
+We are continuously being fuzzed by OSS-FUZZ:
+
+       https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:file
+
 The major changes for 5.x are CDF file parsing, indirect magic, name/use
 (recursion) and overhaul in mime and ascii encoding handling.
 
@@ -91,6 +95,7 @@
 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_csv.c - knows about Comma Separated Value file format (RFC 4180).
 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.
diff -r 6ccf14049ea8 -r 7f56d1bee5a1 external/bsd/file/dist/aclocal.m4
--- a/external/bsd/file/dist/aclocal.m4 Wed May 22 17:19:56 2019 +0000
+++ b/external/bsd/file/dist/aclocal.m4 Tue Dec 17 02:23:52 2019 +0000
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,8 +20,8 @@
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# visibility.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc.
+# visibility.m4 serial 6
+dnl Copyright (C) 2005, 2008, 2010-2019 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -51,42 +51,42 @@
     dnl First, check whether -Werror can be added to the command line, or
     dnl whether it leads to an error because of some other option that the
     dnl user has put into $CC $CFLAGS $CPPFLAGS.
-    AC_MSG_CHECKING([whether the -Werror option is usable])
-    AC_CACHE_VAL([gl_cv_cc_vis_werror], [
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -Werror"
-      AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[]], [[]])],
-        [gl_cv_cc_vis_werror=yes],
-        [gl_cv_cc_vis_werror=no])
-      CFLAGS="$gl_save_CFLAGS"])
-    AC_MSG_RESULT([$gl_cv_cc_vis_werror])
+    AC_CACHE_CHECK([whether the -Werror option is usable],
+      [gl_cv_cc_vis_werror],
+      [gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -Werror"
+       AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([[]], [[]])],
+         [gl_cv_cc_vis_werror=yes],
+         [gl_cv_cc_vis_werror=no])
+       CFLAGS="$gl_save_CFLAGS"
+      ])
     dnl Now check whether visibility declarations are supported.
-    AC_MSG_CHECKING([for simple visibility declarations])
-    AC_CACHE_VAL([gl_cv_cc_visibility], [
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -fvisibility=hidden"
-      dnl We use the option -Werror and a function dummyfunc, because on some
-      dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
-      dnl "visibility attribute not supported in this configuration; ignored"
-      dnl at the first function definition in every compilation unit, and we
-      dnl don't want to use the option in this case.
-      if test $gl_cv_cc_vis_werror = yes; then
-        CFLAGS="$CFLAGS -Werror"
-      fi
-      AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM(
-           [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
-             extern __attribute__((__visibility__("default"))) int exportedvar;
-             extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
-             extern __attribute__((__visibility__("default"))) int exportedfunc (void);
-             void dummyfunc (void) {}
-           ]],
-           [[]])],
-        [gl_cv_cc_visibility=yes],
-        [gl_cv_cc_visibility=no])
-      CFLAGS="$gl_save_CFLAGS"])
-    AC_MSG_RESULT([$gl_cv_cc_visibility])
+    AC_CACHE_CHECK([for simple visibility declarations],
+      [gl_cv_cc_visibility],
+      [gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -fvisibility=hidden"
+       dnl We use the option -Werror and a function dummyfunc, because on some
+       dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+       dnl "visibility attribute not supported in this configuration; ignored"
+       dnl at the first function definition in every compilation unit, and we
+       dnl don't want to use the option in this case.
+       if test $gl_cv_cc_vis_werror = yes; then
+         CFLAGS="$CFLAGS -Werror"
+       fi
+       AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+              extern __attribute__((__visibility__("default"))) int exportedvar;
+              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+              void dummyfunc (void) {}
+            ]],
+            [[]])],
+         [gl_cv_cc_visibility=yes],
+         [gl_cv_cc_visibility=no])
+       CFLAGS="$gl_save_CFLAGS"
+      ])
     if test $gl_cv_cc_visibility = yes; then
       CFLAG_VISIBILITY="-fvisibility=hidden"
       HAVE_VISIBILITY=1
@@ -98,7 +98,7 @@
     [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
 ])
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,10 +110,10 @@
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
+[am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.16.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -129,14 +129,14 @@
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.16.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -188,7 +188,7 @@
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.



Home | Main Index | Thread Index | Old Index