From 16be3325a4bed15130a64d0fcf26beec1f2340d8 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Tue, 3 Sep 2019 02:23:21 +0200 Subject: [PATCH] squashfs-tools: update to 4.4. --- .../patches/CVE-2015-4645.patch | 27 ----------- .../squashfs-tools/patches/fix-compat.patch | 46 ------------------- .../squashfs-tools/patches/vla-overlow.patch | 21 --------- srcpkgs/squashfs-tools/template | 19 ++++---- 4 files changed, 11 insertions(+), 102 deletions(-) delete mode 100644 srcpkgs/squashfs-tools/patches/CVE-2015-4645.patch delete mode 100644 srcpkgs/squashfs-tools/patches/fix-compat.patch delete mode 100644 srcpkgs/squashfs-tools/patches/vla-overlow.patch diff --git a/srcpkgs/squashfs-tools/patches/CVE-2015-4645.patch b/srcpkgs/squashfs-tools/patches/CVE-2015-4645.patch deleted file mode 100644 index bb0f85e0577..00000000000 --- a/srcpkgs/squashfs-tools/patches/CVE-2015-4645.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- squashfs-tools/unsquash-4.c -+++ squashfs-tools/unsquash-4.c -@@ -31,9 +31,9 @@ static unsigned int *id_table; - int read_fragment_table_4(long long *directory_table_end) - { - int res, i; -- int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments); -- int indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments); -- long long fragment_table_index[indexes]; -+ size_t bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments); -+ size_t indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments); -+ long long *fragment_table_index; - - TRACE("read_fragment_table: %d fragments, reading %d fragment indexes " - "from 0x%llx\n", sBlk.s.fragments, indexes, -@@ -44,6 +44,11 @@ int read_fragment_table_4(long long *directory_table_end) - return TRUE; - } - -+ fragment_table_index = malloc(indexes*sizeof(long long)); -+ if(fragment_table_index == NULL) -+ EXIT_UNSQUASH("read_fragment_table: failed to allocate " -+ "fragment table index\n"); -+ - fragment_table = malloc(bytes); - if(fragment_table == NULL) - EXIT_UNSQUASH("read_fragment_table: failed to allocate " diff --git a/srcpkgs/squashfs-tools/patches/fix-compat.patch b/srcpkgs/squashfs-tools/patches/fix-compat.patch deleted file mode 100644 index 91ebfd97af3..00000000000 --- a/srcpkgs/squashfs-tools/patches/fix-compat.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- squashfs-tools/action.c -+++ squashfs-tools/action.c -@@ -1905,6 +1905,9 @@ - return 1; - } - -+#ifndef FNM_EXTMATCH -+#define FNM_EXTMATCH 0 -+#endif - - TEST_FN(name, ACTION_ALL_LNK, \ - return fnmatch(atom->argv[0], action_data->name, ---- squashfs-tools/mksquashfs.c -+++ squashfs-tools/mksquashfs.c -@@ -4391,6 +4391,9 @@ - return paths; - } - -+#ifndef FNM_EXTMATCH -+#define FNM_EXTMATCH 0 -+#endif - - int excluded_match(char *name, struct pathname *path, struct pathnames **new) - { ---- squashfs-tools/pseudo.c -+++ squashfs-tools/pseudo.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - #include - - #include "pseudo.h" ---- squashfs-tools/unsquashfs.c -+++ squashfs-tools/unsquashfs.c -@@ -1410,6 +1410,9 @@ - free(paths); - } - -+#ifndef FNM_EXTMATCH -+#define FNM_EXTMATCH 0 -+#endif - - int matches(struct pathnames *paths, char *name, struct pathnames **new) - { diff --git a/srcpkgs/squashfs-tools/patches/vla-overlow.patch b/srcpkgs/squashfs-tools/patches/vla-overlow.patch deleted file mode 100644 index a9840fe01f0..00000000000 --- a/srcpkgs/squashfs-tools/patches/vla-overlow.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- ./squashfs-tools/unsquashfs.c.orig -+++ ./squashfs-tools/unsquashfs.c -@@ -2099,7 +2099,9 @@ - */ - void *inflator(void *arg) - { -- char tmp[block_size]; -+ char *tmp = malloc(block_size); -+ if(tmp == NULL) -+ EXIT_UNSQUASH("Out of memory allocating block buffer\n"); - - while(1) { - struct cache_entry *entry = queue_get(to_inflate); -@@ -2122,6 +2124,7 @@ - */ - cache_block_ready(entry, res == -1); - } -+ free(tmp); - } - - diff --git a/srcpkgs/squashfs-tools/template b/srcpkgs/squashfs-tools/template index 86cab25984e..28697ad93ad 100644 --- a/srcpkgs/squashfs-tools/template +++ b/srcpkgs/squashfs-tools/template @@ -1,20 +1,23 @@ # Template file for 'squashfs-tools' pkgname=squashfs-tools -version=4.3 -revision=6 +version=4.4 +revision=1 wrksrc="squashfs${version}" +build_wrksrc="squashfs-tools" +build_style=gnu-makefile makedepends="zlib-devel lzo-devel liblzma-devel liblz4-devel" -license="GPL-2" +license="GPL-2.0-or-later" homepage="http://squashfs.sf.net/" short_desc="Tool to create and append to squashfs filesystems" -maintainer="Orphaned " +maintainer="Duncaen " distfiles="${SOURCEFORGE_SITE}/squashfs/squashfs${version}.tar.gz" -checksum=0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6 +checksum=a981b3f3f2054b5a2e658851a3c06a2460ad04a9a8a645e0afe063a63fdbb07e do_build() { - make -C ${pkgname} ${makejobs} XZ_SUPPORT=1 LZO_SUPPORT=1 LZMA_XZ_SUPPORT=1 LZ4_SUPPORT=1 + make ${makejobs} XZ_SUPPORT=1 LZO_SUPPORT=1 LZMA_XZ_SUPPORT=1 LZ4_SUPPORT=1 } + do_install() { - vbin ${pkgname}/mksquashfs - vbin ${pkgname}/unsquashfs + vbin mksquashfs + vbin unsquashfs }