Index: head/sysutils/file/files/patch-src_cdf.c =================================================================== --- head/sysutils/file/files/patch-src_cdf.c (revision 536011) +++ head/sysutils/file/files/patch-src_cdf.c (nonexistent) @@ -1,71 +0,0 @@ ---- src/cdf.c.orig 2019-10-22 21:52:28 UTC -+++ src/cdf.c -@@ -35,7 +35,7 @@ - #include "file.h" - - #ifndef lint --FILE_RCSID("@(#)$File: cdf.c,v 1.114 2019/02/20 02:35:27 christos Exp $") -+FILE_RCSID("@(#)$File: cdf.c,v 1.116 2019/08/26 14:31:39 christos Exp $") - #endif - - #include -@@ -53,6 +53,10 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.114 2019/02/20 02:35: - #define EFTYPE EINVAL - #endif - -+#ifndef SIZE_T_MAX -+#define SIZE_T_MAX CAST(size_t, ~0ULL) -+#endif -+ - #include "cdf.h" - - #ifdef CDF_DEBUG -@@ -405,7 +409,12 @@ cdf_read_sector(const cdf_info_t *info, void *buf, siz - const cdf_header_t *h, cdf_secid_t id) - { - size_t ss = CDF_SEC_SIZE(h); -- size_t pos = CDF_SEC_POS(h, id); -+ size_t pos; -+ -+ if (SIZE_T_MAX / ss < CAST(size_t, id)) -+ return -1; -+ -+ pos = CDF_SEC_POS(h, id); - assert(ss == len); - return cdf_read(info, CAST(off_t, pos), RCAST(char *, buf) + offs, len); - } -@@ -415,7 +424,12 @@ cdf_read_short_sector(const cdf_stream_t *sst, void *b - size_t len, const cdf_header_t *h, cdf_secid_t id) - { - size_t ss = CDF_SHORT_SEC_SIZE(h); -- size_t pos = CDF_SHORT_SEC_POS(h, id); -+ size_t pos; -+ -+ if (SIZE_T_MAX / ss < CAST(size_t, id)) -+ return -1; -+ -+ pos = CDF_SHORT_SEC_POS(h, id); - assert(ss == len); - if (pos + len > CDF_SEC_SIZE(h) * sst->sst_len) { - DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %" -@@ -1013,8 +1027,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const - goto out; - } - nelements = CDF_GETUINT32(q, 1); -- if (nelements == 0) { -- DPRINTF(("CDF_VECTOR with nelements == 0\n")); -+ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) { -+ DPRINTF(("CDF_VECTOR with nelements == %" -+ SIZE_T_FORMAT "u\n", nelements)); - goto out; - } - slen = 2; -@@ -1056,8 +1071,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const - goto out; - inp += nelem; - } -- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", -- nelements)); - for (j = 0; j < nelements && i < sh.sh_properties; - j++, i++) - { Property changes on: head/sysutils/file/files/patch-src_cdf.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/file/files/patch-src_cdf.h =================================================================== --- head/sysutils/file/files/patch-src_cdf.h (revision 536011) +++ head/sysutils/file/files/patch-src_cdf.h (nonexistent) @@ -1,10 +0,0 @@ ---- src/cdf.h.orig 2019-10-22 21:52:35 UTC -+++ src/cdf.h -@@ -48,6 +48,7 @@ - typedef int32_t cdf_secid_t; - - #define CDF_LOOP_LIMIT 10000 -+#define CDF_ELEMENT_LIMIT 100000 - - #define CDF_SECID_NULL 0 - #define CDF_SECID_FREE -1 Property changes on: head/sysutils/file/files/patch-src_cdf.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/file/Makefile =================================================================== --- head/sysutils/file/Makefile (revision 536011) +++ head/sysutils/file/Makefile (revision 536012) @@ -1,28 +1,30 @@ # Created by: Jason Harris # $FreeBSD$ PORTNAME= file -PORTVERSION= 5.37 +PORTVERSION= 5.38 CATEGORIES= sysutils -MASTER_SITES= ftp://ftp.astron.com/pub/file/ \ +MASTER_SITES= https://astron.com/pub/file/ \ + https://www.nic.funet.fi/pub/mirrors/ftp.astron.com/pub/file/ \ + https://ftp.icm.edu.pl/packages/file/ \ ftp://ftp.fu-berlin.de/unix/tools/file/ MAINTAINER= jharris@widomaker.com COMMENT= Utility to determine file type LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING USES= libtool USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-fsect-man5 MAKE_ENV= INSTALL_STRIP_FLAG="${STRIP}" TEST_TARGET= check post-patch: @${REINPLACE_CMD} -e 's|$$(datadir)/misc|$$(datadir)/${PORTNAME}|g' \ ${WRKSRC}/configure .include Index: head/sysutils/file/distinfo =================================================================== --- head/sysutils/file/distinfo (revision 536011) +++ head/sysutils/file/distinfo (revision 536012) @@ -1,3 +1,3 @@ -TIMESTAMP = 1571780726 -SHA256 (file-5.37.tar.gz) = e9c13967f7dd339a3c241b7710ba093560b9a33013491318e88e6b8b57bae07f -SIZE (file-5.37.tar.gz) = 887682 +TIMESTAMP = 1589916680 +SHA256 (file-5.38.tar.gz) = 593c2ffc2ab349c5aea0f55fedfe4d681737b6b62376a9b3ad1e77b2cc19fa34 +SIZE (file-5.38.tar.gz) = 932528